X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdictionary%2Fsys-file-info.c;h=b98854db6ea290a053a43fa377b6d0e4d246b305;hb=92f9121c49de9f91d9d743b5dc854cf701713dc5;hp=2369b99ec809d92679b21e9c69ae186ea346e101;hpb=9f4661992f4b481c6dafa6fd53c94ecfe7b3af8c;p=pspp-builds.git diff --git a/src/language/dictionary/sys-file-info.c b/src/language/dictionary/sys-file-info.c index 2369b99e..b98854db 100644 --- a/src/language/dictionary/sys-file-info.c +++ b/src/language/dictionary/sys-file-info.c @@ -99,7 +99,10 @@ cmd_sysfile_info (struct lexer *lexer, struct dataset *ds UNUSED) reader = sfm_open_reader (h, &d, &info); if (!reader) - return CMD_FAILURE; + { + fh_unref (h); + return CMD_FAILURE; + } casereader_destroy (reader); t = tab_create (2, 10, 0); @@ -184,6 +187,7 @@ cmd_sysfile_info (struct lexer *lexer, struct dataset *ds UNUSED) dict_destroy (d); + fh_unref (h); return lex_end_of_command (lexer); } @@ -419,7 +423,7 @@ display_variables (const struct variable **vl, size_t n, int as) { const char *label = var_get_label (v); tab_joint_text (t, 1, r, 2, r, TAB_LEFT, - label != NULL ? "(no label)" : label); + label == NULL ? "(no label)" : label); } if (as != AS_NAMES) {