diff options
author | Andreas Schneider <asn@samba.org> | 2014-01-09 15:06:14 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2014-01-09 20:42:54 +0100 |
commit | c8371b4ec12f2dea6ce18724de59a23e04826c1d (patch) | |
tree | 3f495c5c10cca59e94e7abbcb6dad72c9509463c /source3/libads | |
parent | 615efa4ae84373ae8aefb36fcf7583338665429a (diff) | |
download | samba-c8371b4ec12f2dea6ce18724de59a23e04826c1d.tar.gz |
s3-libads: Fix memory leaks in ads_build_path().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/libads')
-rw-r--r-- | source3/libads/ads_struct.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/libads/ads_struct.c b/source3/libads/ads_struct.c index fd7e417bad5..30d433e6e30 100644 --- a/source3/libads/ads_struct.c +++ b/source3/libads/ads_struct.c @@ -55,12 +55,14 @@ char *ads_build_path(const char *realm, const char *sep, const char *field, int if (strlcpy(ret,field, len) >= len) { /* Truncate ! */ free(r); + free(ret); return NULL; } p=strtok_r(r, sep, &saveptr); if (p) { if (strlcat(ret, p, len) >= len) { free(r); + free(ret); return NULL; } |