Propagate null gstring through string_catn()
[exim.git] / src / src / lookups / pgsql.c
index c121cb66810cc1473277e677f6a4fe1a35da9781..28d4024d8a385b444ea6c0ce93e8849dd12d4e1d 100644 (file)
@@ -336,6 +336,7 @@ for (int i = 0; i < num_tuples; i++)
       uschar *tmp = US PQgetvalue(pg_result, i, j);
       result = lf_quote(US PQfname(pg_result, j), tmp, Ustrlen(tmp), result);
       }
+  if (!result) result = string_get(1);
   }
 
 /* If result is NULL then no data has been found and so we return FAIL. */