From: Christian Brauner Date: Mon, 30 Aug 2021 12:37:06 +0000 (+0200) Subject: lxc-usernsexec: small tweaks X-Git-Tag: lxc-5.0.0~97^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=922c335290d86434c7436975574c45b4f60115db;p=thirdparty%2Flxc.git lxc-usernsexec: small tweaks Signed-off-by: Christian Brauner --- diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am index ffa9f7f21..20c32d3df 100644 --- a/src/lxc/Makefile.am +++ b/src/lxc/Makefile.am @@ -1847,6 +1847,7 @@ lxc_usernsexec_SOURCES += af_unix.c af_unix.h \ confile_utils.c confile_utils.h \ error.c error.h \ file_utils.c file_utils.h \ + hlist.h \ ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \ initutils.c initutils.h \ list.h \ diff --git a/src/lxc/cmd/lxc_usernsexec.c b/src/lxc/cmd/lxc_usernsexec.c index fb560bf71..a83444dad 100644 --- a/src/lxc/cmd/lxc_usernsexec.c +++ b/src/lxc/cmd/lxc_usernsexec.c @@ -23,6 +23,7 @@ #include "compiler.h" #include "conf.h" #include "config.h" +#include "hlist.h" #include "list.h" #include "log.h" #include "macro.h" @@ -120,7 +121,7 @@ static int add_map_entry(long host_id, long ns_id, long range, int which) { struct id_map *newmap; - newmap = malloc(sizeof(*newmap)); + newmap = zalloc(sizeof(*newmap)); if (!newmap) return -1;