mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
Fix buffer passed to free()
This commit is contained in:
parent
94e49e3f0e
commit
8cd4774468
@ -1,3 +1,7 @@
|
||||
Tue Jan 8 11:12:00 EST 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* src/util.c: Fix addr passed to free() in error cleanup
|
||||
|
||||
Mon Jan 7 10:19:00 EST 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* src/util.c, src/util.h: virFileReadAll() now allocates its
|
||||
|
@ -308,7 +308,7 @@ int virFileReadAll(const char *path,
|
||||
}
|
||||
|
||||
if ((ret = fread(*buf, st.st_size, 1, fh)) != 1) {
|
||||
free(buf);
|
||||
free(*buf);
|
||||
*buf = NULL;
|
||||
virLog("Failed to read config file '%s': %s",
|
||||
path, strerror(errno));
|
||||
|
Loading…
Reference in New Issue
Block a user