/*
This file is part of GNUnet.
- Copyright (C) 2001, 2002, 2003, 2005, 2006 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2001, 2002, 2003, 2005, 2006 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
* want to keep track of allocations.
*
* @param ptr the pointer to free
- * @param filename where in the code was the call to GNUNET_array_grow
- * @param linenumber where in the code was the call to GNUNET_array_grow
+ * @param filename where in the code was the call to GNUNET_free
+ * @param linenumber where in the code was the call to GNUNET_free
*/
void
GNUNET_xfree_ (void *ptr,
memset (tmp, 0, size); /* client code should not rely on this, though... */
if (*oldCount > newCount)
*oldCount = newCount; /* shrink is also allowed! */
- memcpy (tmp, *old, elementSize * (*oldCount));
+ if (NULL != *old)
+ memcpy (tmp, *old, elementSize * (*oldCount));
}
if (*old != NULL)