diff --git a/src/modules/db/http/http.c b/src/modules/db/http/http.c
index 3c87f39..9590810 100644
--- a/src/modules/db/http/http.c
+++ b/src/modules/db/http/http.c
@@ -335,6 +335,7 @@ static struct question *http_question_get(struct question_db *db,
 		 url, translated_tag);
 	
 	system(buf);
+	free(buf);
 	INFO(INFO_DEBUG, "%s: url = [%s]", __FILE__, url);
 	asprintf(&path, "/tmp/cdebconf_q_%s", translated_tag);
 
@@ -346,6 +347,7 @@ static struct question *http_question_get(struct question_db *db,
 
 			INFO(INFO_ERROR, "Cannot get question %s: %s",
 			     ltag, strerror(errno));
+			free(path);
 			return DC_NOTOK;
 		}
 
@@ -378,6 +380,7 @@ static struct question *http_question_get(struct question_db *db,
     }
 
     fclose(inf);
+    free(path);
     return q;
 }
 
diff --git a/src/modules/frontend/slang/slang.c b/src/modules/frontend/slang/slang.c
index 8fa0598..aa42be2 100644
--- a/src/modules/frontend/slang/slang.c
+++ b/src/modules/frontend/slang/slang.c
@@ -544,7 +544,11 @@ static int slang_getselect(struct frontend *ui, struct question *q, int multi)
 			}
 		}
 	}
-	if (ret != DC_OK) return ret;
+	if (ret != DC_OK)
+	{
+		free(selected);
+		    return ret;
+	}
 
 	for (i = 0; i < count; i++)
 	{
diff --git a/src/plugin.c b/src/plugin.c
index ad28b47..d0cb710 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -25,7 +25,7 @@ static char *make_symbol_name(const char *name)
 
 struct plugin *plugin_new(const char *frontend, const char *filename)
 {
-    struct plugin *plugin = NEW(struct plugin);
+    struct plugin *plugin;
     const char *base;
     size_t baselen, symbollen;
     char *typesymbol, *symbol;
@@ -45,6 +45,8 @@ struct plugin *plugin_new(const char *frontend, const char *filename)
     if (strncmp(base + baselen - 3, ".so", 3) != 0)
         return NULL;
 
+    plugin = NEW(struct plugin);
+
     plugin->name = malloc(baselen - 9);
     strncpy(plugin->name, base + 7, baselen - 10);
     plugin->name[baselen - 10] = '\0';
diff --git a/src/strutl.c b/src/strutl.c
index 08b35dc..49bdeb5 100644
--- a/src/strutl.c
+++ b/src/strutl.c
@@ -284,6 +284,11 @@ int strchoicesplitsort(const char *origbuf, const char *transbuf, const char *in
                 /* fall back semi-gracefully to unsorted list */
                 for (j = 0; j < maxnarg; j++)
                     oindex[j] = j;
+                /* Avoid a leak on error */
+                for (j = 0; j < i; j++)
+                    free(sorted_targv[j]);
+                free(sorted_targv);
+                free(cindex);
                 return maxnarg;
             }
             sorted_targv[i] = STRDUP(targv[oindex[i]]);
@@ -727,6 +732,8 @@ int stralign(char **strs, int count)
 
     free(column_widths);
     free(cells_per_line);
+    free(remaining_line_widths);
+    free(remaining_line_sizes);
 
     return 0;
 }
