mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-08 20:51:26 +00:00
libxl: use g_autofree in xenParseSxprVifRate
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
77d228468d
commit
5c98d442df
@ -1063,7 +1063,7 @@ static const char *vif_bytes_per_sec_re = "^[0-9]+[GMK]?[Bb]/s$";
|
|||||||
static int
|
static int
|
||||||
xenParseSxprVifRate(const char *rate, unsigned long long *kbytes_per_sec)
|
xenParseSxprVifRate(const char *rate, unsigned long long *kbytes_per_sec)
|
||||||
{
|
{
|
||||||
char *trate = NULL;
|
g_autofree char *trate = NULL;
|
||||||
char *p;
|
char *p;
|
||||||
regex_t rec;
|
regex_t rec;
|
||||||
int err;
|
int err;
|
||||||
@ -1112,7 +1112,6 @@ xenParseSxprVifRate(const char *rate, unsigned long long *kbytes_per_sec)
|
|||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
regfree(&rec);
|
regfree(&rec);
|
||||||
VIR_FREE(trate);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user