diff --git a/src/xdpfw.c b/src/xdpfw.c index 149a8a5..c0b6f8e 100644 --- a/src/xdpfw.c +++ b/src/xdpfw.c @@ -512,6 +512,10 @@ int main(int argc, char *argv[]) // Check for auto-update. if (cfg.updatetime > 0 && (curTime - lastupdated) > cfg.updatetime) { + // Memleak fix for strdup() in updateconfig() + // Before updating it again, we need to free the old return value + free(cfg.interface); + // Update config. updateconfig(&cfg, cmd.cfgfile);