diff options
author | Joe Orton <joe@manyfish.uk> | 2022-07-20 17:04:28 +0100 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2022-07-20 18:49:05 +0100 |
commit | ba4f21e9f297194e2d9c94fada8df11c7b87742a (patch) | |
tree | 807a0ff7baae9909b253c6e837ffec3570d292df | |
parent | 4ef7569ca6fb3c5ccca22ced2765dddb6ec51dc1 (diff) | |
download | neon-git-ba4f21e9f297194e2d9c94fada8df11c7b87742a.tar.gz |
* src/ne_auth.c (get_cnonce): Fix memory leak introduced in
3cc1e6916bfba255ab7234ad32428b743b521b63.
-rw-r--r-- | src/ne_auth.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ne_auth.c b/src/ne_auth.c index 4c993d7..d74d7ce 100644 --- a/src/ne_auth.c +++ b/src/ne_auth.c @@ -358,6 +358,7 @@ static char *get_cnonce(void) /* Fallback sources of random data: all bad, but no good sources * are available. */ ne_buffer *buf = ne_buffer_create(); + char *ret; { #ifdef HAVE_GETTIMEOFDAY @@ -378,7 +379,9 @@ static char *get_cnonce(void) ne_buffer_snprintf(buf, 32, "%lu", (unsigned long) pid); } - return ne_strhash(NE_HASH_MD5, buf->data, NULL); + ret = ne_strhash(NE_HASH_MD5, buf->data, NULL); + ne_buffer_destroy(buf); + return ret; } } |