]> 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:10:00 +0000 (23:10 -0500)
The code failed to detect an out-of-memory failure.

Xi Wang

src/backend/utils/cache/ts_cache.c

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