#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <assert.h>
+#include <security_utilities/simulatecrash_assert.h>
#include "sec_xdr.h"
return (FALSE);
if (!target)
target = &obj[0];
- if (!sizeof_alloc)
+ if (!sizeof_alloc && addrp != NULL) {
*addrp = target;
+ }
break;
case XDR_FREE:
/*
* the array may need freeing
*/
- if (xdrs->x_op == XDR_FREE) {
+ if (xdrs->x_op == XDR_FREE && addrp != NULL) {
sec_mem_free(xdrs, *addrp, nodesize);
*addrp = NULL;
}