X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=zone.c;h=585c10396d03db32e726ccaef168d1eb32b52043;hb=047d1c8e5064dbe8fe67ee0f2983eb004de1fbe5;hp=7c601cf0918986fd3aec2590ea740b5ee9813d79;hpb=4aa041287d27a50f7cbfd4628d80c118e1bfcade;p=xonotic%2Fdarkplaces.git diff --git a/zone.c b/zone.c index 7c601cf0..585c1039 100644 --- a/zone.c +++ b/zone.c @@ -844,8 +844,10 @@ void MemStats_f(void) char* Mem_strdup (mempool_t *pool, const char* s) { char* p; - size_t sz = strlen (s) + 1; - if (s == NULL) return NULL; + size_t sz; + if (s == NULL) + return NULL; + sz = strlen (s) + 1; p = (char*)Mem_Alloc (pool, sz); strlcpy (p, s, sz); return p;