]> granicus.if.org Git - postgresql/commitdiff
Fix error-checking typo in check_TSCurrentConfig().
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 21 Jan 2013 04:09:35 +0000 (23:09 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 21 Jan 2013 04:09:35 +0000 (23:09 -0500)
The code failed to detect an out-of-memory failure.

Xi Wang

src/backend/utils/cache/ts_cache.c

index e688b1a66837c6ff3c1f428f14bdbe7315027cdf..65a8ad7be1a5920509dcdde30d6ab987b3bdef9c 100644 (file)
@@ -642,7 +642,7 @@ check_TSCurrentConfig(char **newval, void **extra, GucSource source)
                free(*newval);
                *newval = strdup(buf);
                pfree(buf);
-               if (!newval)
+               if (!*newval)
                        return false;
        }