Skip to content

Commit 6864aef

Browse files
committed
Fix: Use "solv_free" for memory allocated by "solv_calloc"
1 parent d52e359 commit 6864aef

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ext/solv_xfopen.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ static LZFILE *lzopen(const char *path, const char *mode, int fd, int isxz)
199199
if (ret != LZMA_OK)
200200
{
201201
fclose(fp);
202-
free(lzfile);
202+
solv_free(lzfile);
203203
return 0;
204204
}
205205
return lzfile;
@@ -232,7 +232,7 @@ static int lzclose(void *cookie)
232232
}
233233
lzma_end(&lzfile->strm);
234234
rc = fclose(lzfile->file);
235-
free(lzfile);
235+
solv_free(lzfile);
236236
return rc;
237237
}
238238

@@ -432,7 +432,7 @@ static int zstdclose(void *cookie)
432432
ZSTD_freeDStream(zstdfile->dstream);
433433
}
434434
rc = fclose(zstdfile->file);
435-
free(zstdfile);
435+
solv_free(zstdfile);
436436
return rc;
437437
}
438438

0 commit comments

Comments
 (0)