Don't free a NULL pointer.

This commit is contained in:
Tim Kientzle 2007-04-15 04:42:52 +00:00
parent 0c3e4592a6
commit 1eb296a82c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=168746

View File

@ -238,7 +238,8 @@ archive_compressor_none_finish(struct archive_write *a)
if (a->client_closer != NULL)
ret2 = (a->client_closer)(&a->archive, a->client_data);
free(state->buffer);
if (state->buffer)
free(state->buffer);
free(state);
a->compression_data = NULL;