mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
sexpr_string: avoid leak on OOM error path
* src/xen/sexpr.c (sexpr_string): Free sexpr buffer upon allocation failure.
This commit is contained in:
parent
04ebf058d5
commit
a7e80e6bfd
@ -119,6 +119,7 @@ sexpr_string(const char *str, ssize_t len)
|
||||
}
|
||||
|
||||
if (ret->u.value == NULL) {
|
||||
VIR_FREE(ret);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user