X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=ucw%2Falloc_str.c;h=bcc49b089dfe4fe3ebf9d71fce8ff8245d5a1e60;hb=0204a4ff10292047628c754b0d088a742b511bb3;hp=5b3d839253b1e5b7c0f25a3adb6d5ea395eb4332;hpb=031256ad2e123eec58521f8e3eb9496c197641d2;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); }