summaryrefslogtreecommitdiff
path: root/source3/smbd/nttrans.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/nttrans.c')
-rw-r--r--source3/smbd/nttrans.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 417e3421cb..796eb44332 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -48,21 +48,16 @@ static const char *known_nt_pipes[] = {
static char *nttrans_realloc(char **ptr, size_t size)
{
- char *tptr = NULL;
if (ptr==NULL) {
smb_panic("nttrans_realloc() called with NULL ptr\n");
}
- tptr = SMB_REALLOC(*ptr, size);
- if(tptr == NULL) {
- *ptr = NULL;
+ *ptr = SMB_REALLOC(*ptr, size);
+ if(*ptr == NULL) {
return NULL;
}
- memset(tptr,'\0',size);
-
- *ptr = tptr;
-
- return tptr;
+ memset(*ptr,'\0',size);
+ return *ptr;
}
/****************************************************************************