Memory leak in tests/gssapi/t_imp_name.c
authorEzra Peisach <epeisach@mit.edu>
Sun, 31 Dec 2006 18:10:27 +0000 (18:10 +0000)
committerEzra Peisach <epeisach@mit.edu>
Sun, 31 Dec 2006 18:10:27 +0000 (18:10 +0000)
Memory leak by not releasing name_oid from gss_display_name().
(conditional on GSSAPI_V2 being defined).

ticket:new

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19024 dc483132-0cff-0310-8789-dd5450dbe970

src/tests/gssapi/t_imp_name.c

index f4ca41370e65ace1bbbd643a2eb0f0b81f5a5e12..b7001b2161667c1b7dc3785874c584c0908404d5 100644 (file)
@@ -88,7 +88,9 @@ static int test_import_name(name)
        display_buffer(buffer_name);
        printf("\n");
        (void) gss_release_buffer(&min_stat, &buffer_name);
-
+#ifdef GSSAPI_V2
+       (void) gss_release_oid(&min_stat, &name_oid);
+#endif
        (void) gss_release_name(&min_stat, &gss_name);
        return 0;
 }