Reference count struct dictionary.
[pspp] / src / data / psql-reader.c
index a8eb91ef7c8da5eb1696de7de0d8573a69df46d8..4a49ba0cf92c413c551811b1ce1a87dd9e64c062 100644 (file)
@@ -376,11 +376,11 @@ psql_open_reader (struct psql_read_info *info, struct dictionary **dict)
       int width = 0;
       int length ;
 
-      /* If there are no data then make a finger in the air 
+      /* If there are no data then make a finger in the air
         guess at the contents */
       if ( n_tuples > 0 )
        length = PQgetlength (qres, 0, i);
-      else 
+      else
        length = PSQL_DEFAULT_WIDTH;
 
       switch (type)
@@ -544,7 +544,7 @@ psql_open_reader (struct psql_read_info *info, struct dictionary **dict)
      &psql_casereader_class, r);
 
  error:
-  dict_destroy (*dict);
+  dict_unref (*dict);
 
   psql_casereader_destroy (NULL, r);
   return NULL;