Permalink
Browse files

daemon: Fix leak of string in make_pidfile().

Coverity #10724
  • Loading branch information...
justinpettit committed Feb 22, 2011
1 parent 9466d7d commit 4c1b8fc2e514344a55789d6ac9909ce904137578
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/daemon.c
View
@@ -223,11 +223,11 @@ make_pidfile(void)
pidfile, strerror(errno));
}
}
- free(text);
} else {
VLOG_ERR("%s: write failed: %s", tmpfile, strerror(errno));
close(fd);
}
+ free(text);
} else {
VLOG_ERR("%s: fcntl failed: %s", tmpfile, strerror(errno));
close(fd);

0 comments on commit 4c1b8fc

Please sign in to comment.