]> git.deb.at Git - pkg/abook.git/blobdiff - options.c
- add xstrdup to have proper checking for memory allocation failures
[pkg/abook.git] / options.c
index 7d18f552f075cfcfa5f8c1c2083d472951bd410d..f698fb823f089e57c8f3a0a151e42110876e52fe 100644 (file)
--- a/options.c
+++ b/options.c
@@ -16,6 +16,7 @@
 #include "options.h"
 #include "abook.h"
 #include "misc.h"
+#include "xmalloc.h"
 
 #ifndef FALSE
 #      define FALSE    0
@@ -99,7 +100,7 @@ set_str(enum str_opts opt, char *value)
        if(str_opts[opt])
                free(str_opts[opt]);
 
-       str_opts[opt] = strdup(value);
+       str_opts[opt] = xstrdup(value);
 }
 
 int