X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Falloc_str.c;h=bcc49b089dfe4fe3ebf9d71fce8ff8245d5a1e60;hb=f17e4350dcf0c033891e52b30b0c32a4a4fed5e0;hp=5b3d839253b1e5b7c0f25a3adb6d5ea395eb4332;hpb=1cf8ac51f5495ccd5187dc220ffc69e95d6e0cfc;p=libucw.git diff --git a/ucw/alloc_str.c b/ucw/alloc_str.c index 5b3d8392..bcc49b08 100644 --- a/ucw/alloc_str.c +++ b/ucw/alloc_str.c @@ -7,13 +7,15 @@ * of the GNU Lesser General Public License. */ -#include "ucw/lib.h" +#include #include char * xstrdup(const char *s) { + if (!s) + return NULL; uns l = strlen(s) + 1; return memcpy(xmalloc(l), s, l); }