Author: vlendec Date: 2007-08-31 09:39:11 +0000 (Fri, 31 Aug 2007) New Revision: 24826
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24826 Log: Fix two memleaks in idmap_cache.c, bug 4917 Thanks again to Patrick Rynhart for persisting :-) Simo, please check! Modified: branches/SAMBA_3_0_25/source/nsswitch/idmap_cache.c branches/SAMBA_3_2/source/nsswitch/idmap_cache.c branches/SAMBA_3_2_0/source/nsswitch/idmap_cache.c Changeset: Modified: branches/SAMBA_3_0_25/source/nsswitch/idmap_cache.c =================================================================== --- branches/SAMBA_3_0_25/source/nsswitch/idmap_cache.c 2007-08-31 09:15:57 UTC (rev 24825) +++ branches/SAMBA_3_0_25/source/nsswitch/idmap_cache.c 2007-08-31 09:39:11 UTC (rev 24826) @@ -399,7 +399,8 @@ if (databuf.dptr == NULL) { DEBUG(10, ("Cache entry with key = %s couldn't be found\n", sidkey)); - return NT_STATUS_NONE_MAPPED; + ret = NT_STATUS_NONE_MAPPED; + goto done; } t = strtol(databuf.dptr, &endptr, 10); @@ -496,7 +497,8 @@ if (databuf.dptr == NULL) { DEBUG(10, ("Cache entry with key = %s couldn't be found\n", idkey)); - return NT_STATUS_NONE_MAPPED; + ret = NT_STATUS_NONE_MAPPED; + goto done; } t = strtol(databuf.dptr, &endptr, 10); Modified: branches/SAMBA_3_2/source/nsswitch/idmap_cache.c =================================================================== --- branches/SAMBA_3_2/source/nsswitch/idmap_cache.c 2007-08-31 09:15:57 UTC (rev 24825) +++ branches/SAMBA_3_2/source/nsswitch/idmap_cache.c 2007-08-31 09:39:11 UTC (rev 24826) @@ -344,7 +344,8 @@ if (databuf.dptr == NULL) { DEBUG(10, ("Cache entry with key = %s couldn't be found\n", sidkey)); - return NT_STATUS_NONE_MAPPED; + ret = NT_STATUS_NONE_MAPPED; + goto done; } t = strtol((const char *)databuf.dptr, &endptr, 10); @@ -452,7 +453,8 @@ if (databuf.dptr == NULL) { DEBUG(10, ("Cache entry with key = %s couldn't be found\n", idkey)); - return NT_STATUS_NONE_MAPPED; + ret = NT_STATUS_NONE_MAPPED; + goto done; } t = strtol((const char *)databuf.dptr, &endptr, 10); Modified: branches/SAMBA_3_2_0/source/nsswitch/idmap_cache.c =================================================================== --- branches/SAMBA_3_2_0/source/nsswitch/idmap_cache.c 2007-08-31 09:15:57 UTC (rev 24825) +++ branches/SAMBA_3_2_0/source/nsswitch/idmap_cache.c 2007-08-31 09:39:11 UTC (rev 24826) @@ -344,7 +344,8 @@ if (databuf.dptr == NULL) { DEBUG(10, ("Cache entry with key = %s couldn't be found\n", sidkey)); - return NT_STATUS_NONE_MAPPED; + ret = NT_STATUS_NONE_MAPPED; + goto done; } t = strtol((const char *)databuf.dptr, &endptr, 10); @@ -452,7 +453,8 @@ if (databuf.dptr == NULL) { DEBUG(10, ("Cache entry with key = %s couldn't be found\n", idkey)); - return NT_STATUS_NONE_MAPPED; + ret = NT_STATUS_NONE_MAPPED; + goto done; } t = strtol((const char *)databuf.dptr, &endptr, 10);