aboutsummaryrefslogtreecommitdiffstats
path: root/w3mbookmark.c
diff options
context:
space:
mode:
Diffstat (limited to 'w3mbookmark.c')
-rw-r--r--w3mbookmark.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/w3mbookmark.c b/w3mbookmark.c
index fcbad11..a306f26 100644
--- a/w3mbookmark.c
+++ b/w3mbookmark.c
@@ -79,6 +79,7 @@ print_bookmark_panel(char *bmark, char *url, char *title, char *charset)
}
}
printf("</select>\n");
+ fclose(f);
}
printf(bkmark_src2, html_quote(url), html_quote(title));
}
@@ -168,7 +169,10 @@ insert_bookmark(char *bmark, struct parsed_tagarg *data)
/* In this case, a new bookmark is appeneded after the bookmark file */
return create_new_bookmark(bmark, section, title, url, "a");
}
- f = fopen(bmark, "w");
+ if ((f = fopen(bmark, "w")) == NULL) {
+ printf("\nCannot open bookmark %s\n", bmark);
+ return FALSE;
+ }
while (tl->nitem) {
fputs(popText(tl), f);
}