mirror of
https://github.com/systemd/systemd.git
synced 2024-10-28 03:25:31 +03:00
sd-dhcp6-client: fix free before use
This commit is contained in:
parent
5da8149fd3
commit
54d61deb7b
@ -532,6 +532,9 @@ error:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int client_ensure_iaid(sd_dhcp6_client *client) {
|
static int client_ensure_iaid(sd_dhcp6_client *client) {
|
||||||
|
/* name is a pointer to memory in the udev_device struct, so must
|
||||||
|
have the same scope */
|
||||||
|
_cleanup_udev_device_unref_ struct udev_device *device = NULL;
|
||||||
const char *name = NULL;
|
const char *name = NULL;
|
||||||
uint64_t id;
|
uint64_t id;
|
||||||
|
|
||||||
@ -543,7 +546,6 @@ static int client_ensure_iaid(sd_dhcp6_client *client) {
|
|||||||
if (detect_container(NULL) <= 0) {
|
if (detect_container(NULL) <= 0) {
|
||||||
/* not in a container, udev will be around */
|
/* not in a container, udev will be around */
|
||||||
_cleanup_udev_unref_ struct udev *udev;
|
_cleanup_udev_unref_ struct udev *udev;
|
||||||
_cleanup_udev_device_unref_ struct udev_device *device = NULL;
|
|
||||||
char ifindex_str[2 + DECIMAL_STR_MAX(int)];
|
char ifindex_str[2 + DECIMAL_STR_MAX(int)];
|
||||||
|
|
||||||
udev = udev_new();
|
udev = udev_new();
|
||||||
|
Loading…
Reference in New Issue
Block a user