diff options
author | Thomas Graf <tgraf@suug.ch> | 2011-03-24 21:14:52 +0100 |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2011-03-24 21:14:52 +0100 |
commit | f523f297f7fed8b64fe4c2a6e3791d31b2d2448b (patch) | |
tree | ea26b71a71db31184f917cd3ce3d9ce609a6b5eb /lib/route/pktloc.c | |
parent | 8d5493418a5a82b5303722cd9b2964300813e693 (diff) | |
download | libnl-f523f297f7fed8b64fe4c2a6e3791d31b2d2448b.tar.gz |
Allow NLSYSCONFDIR environment variable to overwrite built-in sysconfdir
Diffstat (limited to 'lib/route/pktloc.c')
-rw-r--r-- | lib/route/pktloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/route/pktloc.c b/lib/route/pktloc.c index 4d7d9dd..b677ab5 100644 --- a/lib/route/pktloc.c +++ b/lib/route/pktloc.c @@ -94,7 +94,8 @@ static int read_pktlocs(void) int i, err; FILE *fd; - asprintf(&path, "%s/pktloc", SYSCONFDIR); + if (build_sysconf_path(&path, "pktloc") < 0) + return -NLE_NOMEM; /* if stat fails, just try to read the file */ if (stat(path, &st) == 0) { |