Fix an error path memleak
authorVolker Lendecke <vl@samba.org>
Sun, 25 Jan 2009 19:33:22 +0000 (20:33 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 25 Jan 2009 19:52:42 +0000 (20:52 +0100)
source3/libsmb/clifile.c

index 04bbabe0874e568eca62aefa2ee24d3a63e01a2f..ecb2bf0f5a31101b71878127794dc0bff769240a 100644 (file)
@@ -814,6 +814,7 @@ uint8_t *smb_bytes_push_str(uint8_t *buf, bool ucs2, const char *str)
        buf = TALLOC_REALLOC_ARRAY(NULL, buf, uint8_t,
                                   buflen + converted_size);
        if (buf == NULL) {
+               TALLOC_FREE(converted);
                return NULL;
        }