diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2015-08-11 13:05:46 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2015-08-11 13:05:46 +0000 |
commit | af52480aabcb700c9bf68989a5e6c648d22f9945 (patch) | |
tree | 17ee2ecab281cfb16d0a622d7adf6ae4ce385cfa /w3mbookmark.c | |
parent | Update ChangeLog (diff) | |
parent | Check for presence of prevl before using (diff) | |
download | w3m-af52480aabcb700c9bf68989a5e6c648d22f9945.tar.gz w3m-af52480aabcb700c9bf68989a5e6c648d22f9945.zip |
Merge branch 'bug/sw3m'
Diffstat (limited to 'w3mbookmark.c')
-rw-r--r-- | w3mbookmark.c | 6 |
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); } |