Hi This series fixes a set of bugs found by the Clang analyzer.
First patch fixes a Clang warning. readdir(NULL) is not valid. - Lauri
>From 075079ee2c641a5d21300370e816abf84754453c Mon Sep 17 00:00:00 2001 From: Lauri Kasanen <[email protected]> Date: Wed, 23 May 2012 17:13:12 +0300 Subject: [PATCH 01/13] config: Don't pass NULL to readdir This fixes a Clang warning. readdir(NULL) is not valid. Signed-off-by: Lauri Kasanen <[email protected]> --- src/mk_config.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/mk_config.c b/src/mk_config.c index 8bdd7b0..47c5923 100644 --- a/src/mk_config.c +++ b/src/mk_config.c @@ -546,6 +546,8 @@ void mk_config_read_hosts(char *path) mk_string_build(&buf, &len, "%s/sites/", path); if (!(dir = opendir(buf))) { mk_err("Could not open %s", buf); + mk_mem_free(buf); + return; } mk_mem_free(buf); -- 1.7.2.1
_______________________________________________ Monkey mailing list [email protected] http://lists.monkey-project.com/listinfo/monkey
