1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

r16663: Fix coverity #301, memleak in error path.

Jeremy.
(This used to be commit dfdb4ce89155dc1528b455252751616cc2c6708c)
This commit is contained in:
Jeremy Allison 2006-06-29 00:04:47 +00:00 committed by Gerald (Jerry) Carter
parent cc1457beb0
commit 124cd3c604

View File

@ -905,6 +905,7 @@ static int tdbsam_traverse_setpwent(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data,
if (!ptr->key.dptr) {
DEBUG(0,("tdbsam_traverse_setpwent: memdup failed\n"));
/* just return 0 and let the traversal continue */
SAFE_FREE(ptr);
return 0;
}
@ -914,7 +915,6 @@ static int tdbsam_traverse_setpwent(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data,
}
return 0;
}