Fix memory leak in test kdcpreauth module
authorGreg Hudson <ghudson@mit.edu>
Wed, 21 Oct 2015 17:23:37 +0000 (13:23 -0400)
committerGreg Hudson <ghudson@mit.edu>
Mon, 26 Oct 2015 21:57:45 +0000 (17:57 -0400)
In test_verify(), in the second round trip case, free the string
attribute before returning.

src/plugins/preauth/test/kdctest.c

index 82a03b0e2e7b733bd72f2af97212f11411c9ed98..026dc680dc07f4fc585a29a5adc1646f8ed82d11 100644 (file)
@@ -142,6 +142,7 @@ test_verify(krb5_context context, krb5_data *req_pkt, krb5_kdc_req *request,
         }
         free(str);
         enc_tkt_reply->flags |= TKT_FLG_PRE_AUTH;
+        cb->free_string(context, rock, attr);
         (*respond)(arg, 0, NULL, NULL, NULL);
     } else {
         d = string2data("more");