Author: gd Date: 2006-06-21 23:43:33 +0000 (Wed, 21 Jun 2006) New Revision: 16452
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16452 Log: Fix memleak in the CLDAP processing (found by valgrind). Guenther Modified: branches/SAMBA_3_0/source/libads/cldap.c trunk/source/libads/cldap.c Changeset: Modified: branches/SAMBA_3_0/source/libads/cldap.c =================================================================== --- branches/SAMBA_3_0/source/libads/cldap.c 2006-06-21 22:45:15 UTC (rev 16451) +++ branches/SAMBA_3_0/source/libads/cldap.c 2006-06-21 23:43:33 UTC (rev 16452) @@ -225,6 +225,7 @@ asn1_end_tag(&data); if (data.has_error) { + asn1_free(&data); DEBUG(1,("Failed to parse cldap reply\n")); return -1; } @@ -262,6 +263,8 @@ data_blob_free(&os3); data_blob_free(&blob); + asn1_free(&data); + return 0; } Modified: trunk/source/libads/cldap.c =================================================================== --- trunk/source/libads/cldap.c 2006-06-21 22:45:15 UTC (rev 16451) +++ trunk/source/libads/cldap.c 2006-06-21 23:43:33 UTC (rev 16452) @@ -225,6 +225,7 @@ asn1_end_tag(&data); if (data.has_error) { + asn1_free(&data); DEBUG(1,("Failed to parse cldap reply\n")); return -1; } @@ -262,6 +263,8 @@ data_blob_free(&os3); data_blob_free(&blob); + asn1_free(&data); + return 0; }
