summaryrefslogtreecommitdiff
path: root/interface.h
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2020-04-13 16:24:25 +0100
committerDaniel Golle <daniel@makrotopia.org>2020-04-13 17:36:24 +0100
commitaaaca2e40895775135b13a1992ff139b7610b217 (patch)
tree7fe8031b4b2103c32ada9d45dc722a034c12ee02 /interface.h
parentdfd0b106f63da5f14c413b483bffd1f09768460e (diff)
downloadnetifd-aaaca2e40895775135b13a1992ff139b7610b217.tar.gz
interface: allocate and free memory for jail name
Memory returned by blogmsg_get_string() is volatile, hence use strdup() to have a permanent copy of the returned string and free it when no longer needed. Fixes: 1321c1b ("add basic support for jail network namespaces") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'interface.h')
-rw-r--r--interface.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/interface.h b/interface.h
index 0d384ef..cd09812 100644
--- a/interface.h
+++ b/interface.h
@@ -108,7 +108,7 @@ struct interface {
const char *name;
const char *ifname;
- const char *jail;
+ char *jail;
int netns_fd;
bool available;