From 8843550c28832e1de92cb72584d7b2448aefe273 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 31 Aug 2007 09:39:11 +0000 Subject: r24826: Fix two memleaks in idmap_cache.c, bug 4917 Thanks again to Patrick Rynhart for persisting :-) Simo, please check! (This used to be commit 0a9171f9efc2322954c0d06757b91d9124ab8a8e) --- source3/nsswitch/idmap_cache.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/nsswitch/idmap_cache.c b/source3/nsswitch/idmap_cache.c index fa44617a8c..4f01cb1392 100644 --- a/source3/nsswitch/idmap_cache.c +++ b/source3/nsswitch/idmap_cache.c @@ -344,7 +344,8 @@ NTSTATUS idmap_cache_map_sid(struct idmap_cache_ctx *cache, struct id_map *id) 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 @@ NTSTATUS idmap_cache_map_id(struct idmap_cache_ctx *cache, struct id_map *id) 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); -- cgit