summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-08-31 09:39:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:25 -0500
commit8843550c28832e1de92cb72584d7b2448aefe273 (patch)
tree18c56f39f3b54e6af739cfe1b013c5e9406c9a23
parentfe6c338463f47bc5abcaa5f73a3fe48df4accd46 (diff)
downloadsamba-8843550c28832e1de92cb72584d7b2448aefe273.tar.gz
samba-8843550c28832e1de92cb72584d7b2448aefe273.tar.bz2
samba-8843550c28832e1de92cb72584d7b2448aefe273.zip
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)
-rw-r--r--source3/nsswitch/idmap_cache.c6
1 files changed, 4 insertions, 2 deletions
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);