X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fpsql-reader.c;h=4a49ba0cf92c413c551811b1ce1a87dd9e64c062;hb=8d6bfdd2a100bf8166b3b0b3f006d46f3e7a59e9;hp=a8eb91ef7c8da5eb1696de7de0d8573a69df46d8;hpb=52e144652645cab108fb2db0a970f1ace2cbf2ea;p=pspp diff --git a/src/data/psql-reader.c b/src/data/psql-reader.c index a8eb91ef7c..4a49ba0cf9 100644 --- a/src/data/psql-reader.c +++ b/src/data/psql-reader.c @@ -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;