mirror of
https://github.com/rkd77/elinks.git
synced 2025-04-18 00:47:36 -04:00
[bookmarks] null_or_stracpy to avoid NULL title. Refs #227
This commit is contained in:
parent
c8e0dd9e47
commit
fe368c8181
@ -312,7 +312,7 @@ init_bookmark(struct bookmark *root, const char *title, const char *url)
|
|||||||
bm = (struct bookmark *)mem_calloc(1, sizeof(*bm));
|
bm = (struct bookmark *)mem_calloc(1, sizeof(*bm));
|
||||||
if (!bm) return NULL;
|
if (!bm) return NULL;
|
||||||
|
|
||||||
bm->title = stracpy(title);
|
bm->title = null_or_stracpy(title);
|
||||||
if (!bm->title) {
|
if (!bm->title) {
|
||||||
mem_free(bm);
|
mem_free(bm);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user