diff options
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/smb_macros.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h index 41eac7e994..6c9ab017ba 100644 --- a/source3/include/smb_macros.h +++ b/source3/include/smb_macros.h @@ -271,8 +271,10 @@ copy an IP address from one buffer to another *****************************************************************************/ #define SMB_MALLOC_ARRAY(type,count) (type *)malloc_array(sizeof(type),(count)) -#define SMB_REALLOC(p,s) Realloc((p),(s)) -#define SMB_REALLOC_ARRAY(p,type,count) (type *)realloc_array((p),sizeof(type),(count)) +#define SMB_REALLOC(p,s) Realloc((p),(s),True) /* Always frees p on error or s == 0 */ +#define SMB_REALLOC_KEEP_OLD_ON_ERROR(p,s) Realloc((p),(s),False) /* Never frees p on error or s == 0 */ +#define SMB_REALLOC_ARRAY(p,type,count) (type *)realloc_array((p),sizeof(type),(count),True) /* Always frees p on error or s == 0 */ +#define SMB_REALLOC_ARRAY_KEEP_OLD_ON_ERROR(p,type,count) (type *)realloc_array((p),sizeof(type),(count),False) /* Always frees p on error or s == 0 */ #define SMB_CALLOC_ARRAY(type,count) (type *)calloc_array(sizeof(type),(count)) #define SMB_XMALLOC_P(type) (type *)smb_xmalloc_array(sizeof(type),1) #define SMB_XMALLOC_ARRAY(type,count) (type *)smb_xmalloc_array(sizeof(type),(count)) |