]> git.deb.at Git - pkg/abook.git/blobdiff - ui.c
- add xstrdup to have proper checking for memory allocation failures
[pkg/abook.git] / ui.c
diff --git a/ui.c b/ui.c
index bde07e4fde9e45288580e6bd00cea188160df046..62b5e8f327d52340f2986c46005a47ee421c9b0a 100644 (file)
--- a/ui.c
+++ b/ui.c
@@ -22,6 +22,7 @@
 #include "misc.h"
 #include "options.h"
 #include "filter.h"
+#include "xmalloc.h"
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
@@ -605,7 +606,7 @@ ui_open_datafile()
                load_database(datafile);
        } else {
                free(datafile);
-               datafile = strdup(filename);
+               datafile = xstrdup(filename);
        }
 
        refresh_screen();