summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils.c b/src/utils.c
index e30a0b3..206c684 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -245,7 +245,7 @@ int buffer_read_from_filename(const char *filename, char **buffer, uint64_t *len
int ret = 1;
if (fread(*buffer, sizeof(char), size, f) != size) {
usbmuxd_log(LL_ERROR, "%s: ERROR: couldn't read %d bytes from %s", __func__, (int)size, filename);
- free(buffer);
+ free(*buffer);
ret = 0;
errno = EIO;
}