aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/content-parser.c2
-rw-r--r--src/utils/mem.c4
-rw-r--r--src/utils/slist.c4
-rw-r--r--src/utils/strings.c8
-rw-r--r--src/utils/trie.c4
5 files changed, 20 insertions, 2 deletions
diff --git a/src/content-parser.c b/src/content-parser.c
index ea41852..f19b800 100644
--- a/src/content-parser.c
+++ b/src/content-parser.c
@@ -306,7 +306,7 @@ blogc_content_parse(const char *src)
char *parsed = NULL;
char **tmpv = NULL;
- char d;
+ char d = '\0';
b_slist_t *lines = NULL;
diff --git a/src/utils/mem.c b/src/utils/mem.c
index 04201ff..ff512df 100644
--- a/src/utils/mem.c
+++ b/src/utils/mem.c
@@ -6,6 +6,10 @@
* See the file COPYING.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif /* HAVE_CONFIG_H */
+
#include <stdlib.h>
#include <stdio.h>
#include "utils.h"
diff --git a/src/utils/slist.c b/src/utils/slist.c
index a606977..f82c336 100644
--- a/src/utils/slist.c
+++ b/src/utils/slist.c
@@ -6,6 +6,10 @@
* See the file COPYING.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif /* HAVE_CONFIG_H */
+
#include <stdlib.h>
#include "utils.h"
diff --git a/src/utils/strings.c b/src/utils/strings.c
index 04ccc7a..4a48f6d 100644
--- a/src/utils/strings.c
+++ b/src/utils/strings.c
@@ -6,6 +6,10 @@
* See the file COPYING.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif /* HAVE_CONFIG_H */
+
#include <ctype.h>
#include <string.h>
#include <stdarg.h>
@@ -57,8 +61,10 @@ b_strdup_vprintf(const char *format, va_list ap)
if (!tmp)
return NULL;
int l2 = vsnprintf(tmp, l + 1, format, ap);
- if (l2 < 0)
+ if (l2 < 0) {
+ free(tmp);
return NULL;
+ }
return tmp;
}
diff --git a/src/utils/trie.c b/src/utils/trie.c
index f3933a3..22d8c48 100644
--- a/src/utils/trie.c
+++ b/src/utils/trie.c
@@ -6,6 +6,10 @@
* See the file COPYING.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif /* HAVE_CONFIG_H */
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>