fix
authorChristian Grothoff <christian@grothoff.org>
Fri, 27 Aug 2010 13:19:33 +0000 (13:19 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 27 Aug 2010 13:19:33 +0000 (13:19 +0000)
src/datacache/plugin_datacache_postgres.c

index 50d464a70c27d5340d225995130aaaaac1f0d835..fcd9e516138571c8faa6aa4e04a0ff6fc2ddc07d 100644 (file)
@@ -408,7 +408,10 @@ postgres_plugin_get (void *cls,
       return 0; 
     }
   if (iter == NULL)
-    return cnt;
+    {
+      PQclear (res);
+      return cnt;
+    }
   if ( (3 != PQnfields (res)) ||
        (sizeof (uint64_t) != PQfsize (res, 0)) ||
        (sizeof (uint32_t) != PQfsize (res, 1)))