diff --git a/src/extensions/qconfig.c b/src/extensions/qconfig.c
index 745a28b..87bfd67 100644
--- a/src/extensions/qconfig.c
+++ b/src/extensions/qconfig.c
@@ -399,6 +399,7 @@ static char *_parsestr(qlisttbl_t *tbl, const char *str) {
                     }
                     if ((newstr = tbl->getstr(tbl, varstr, true)) == NULL) {
                         s = e;  // not found
+free(varstr);
                         continue;
                     }
                     break;