diff --git a/contrib/file/compress.c b/contrib/file/compress.c index 4308abfaa3ab..2d8d77f2cb35 100644 --- a/contrib/file/compress.c +++ b/contrib/file/compress.c @@ -480,7 +480,7 @@ uncompressbuf(struct magic_set *ms, int fd, size_t method, #endif free(*newch); n = 0; - newch[0] = '\0'; + *newch = NULL; goto err; } else { n = r;