chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5da8149
)
sd-dhcp6-client: fix free before use
author
Tom Gundersen
<teg@jklm.no>
Tue, 1 Jul 2014 08:16:42 +0000
(10:16 +0200)
committer
Tom Gundersen
<teg@jklm.no>
Tue, 1 Jul 2014 08:21:18 +0000
(10:21 +0200)
src/libsystemd-network/sd-dhcp6-client.c
patch
|
blob
|
history
diff --git
a/src/libsystemd-network/sd-dhcp6-client.c
b/src/libsystemd-network/sd-dhcp6-client.c
index 2d5bedcb8bced12993244b225f83dffbe4d1e429..6e006624ca111990017352ebd38f62f058fe7cae 100644
(file)
--- a/
src/libsystemd-network/sd-dhcp6-client.c
+++ b/
src/libsystemd-network/sd-dhcp6-client.c
@@
-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;
uint64_t id;
const char *name = NULL;
uint64_t id;
@@
-543,7
+546,6
@@
static int client_ensure_iaid(sd_dhcp6_client *client) {
if (detect_container(NULL) <= 0) {
/* not in a container, udev will be around */
_cleanup_udev_unref_ struct udev *udev;
if (detect_container(NULL) <= 0) {
/* not in a container, udev will be around */
_cleanup_udev_unref_ struct udev *udev;
- _cleanup_udev_device_unref_ struct udev_device *device = NULL;
char ifindex_str[2 + DECIMAL_STR_MAX(int)];
udev = udev_new();
char ifindex_str[2 + DECIMAL_STR_MAX(int)];
udev = udev_new();