Fix an error path memleak
[metze/samba/wip.git] / 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;
        }