]> granicus.if.org Git - libtirpc/commitdiff
libtirpc: must free saved wire verifier when destroying context 0.0.10 0.0.10-rc1 0.0.9-rc1
authorJeff Layton <jlayton@redhat.com>
Fri, 13 Mar 2009 16:48:40 +0000 (12:48 -0400)
committerSteve Dickson <steved@redhat.com>
Fri, 13 Mar 2009 16:48:40 +0000 (12:48 -0400)
When we're destroying the authgss context, we must also free any
saved wire verifier that we have to keep from leaking memory.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
src/auth_gss.c

index bf6cba69a16af3e7f09bdc4ad83b07eab5913ce5..df3017a2462adfc6c8718cab3b1a5a3256fcd230 100644 (file)
@@ -567,6 +567,12 @@ authgss_destroy_context(AUTH *auth)
                gss_delete_sec_context(&min_stat, &gd->ctx, NULL);
                gd->ctx = GSS_C_NO_CONTEXT;
        }
+
+       /* free saved wire verifier (if any) */
+       mem_free(gd->gc_wire_verf.value, gd->gc_wire_verf.length);
+       gd->gc_wire_verf.value = NULL;
+       gd->gc_wire_verf.length = 0;
+
        gd->established = FALSE;
 }