mcxt.c - Mailing list pgsql-patches

From Mendola Gaetano
Subject mcxt.c
Date
Msg-id 000701c37560$b2111500$f3710b3e@mm.eutelsat.org
Whole thread Raw
Responses Re: mcxt.c
List pgsql-patches
A test for null string is missing here:



*** pgsql/src/backend/utils/mmgr/mcxt.c 2003-09-02 13:30:05.000000000 +0200
--- pgsql.old/src/backend/utils/mmgr/mcxt.c 2003-08-04 04:40:08.000000000
+0200
*************** char *
*** 620,632 ****
MemoryContextStrdup(MemoryContext context, const char *string)
{
char *nstr;
-
- if ( !string )
- {
- elog(ERROR, "MemoryContextStrdup called with a NULL pointer");
- return NULL;
- }
-
Size len = strlen(string) + 1;
nstr = (char *) MemoryContextAlloc(context, len);
--- 620,625 ----



pgsql-patches by date:

Previous
From: Manfred Koizar
Date:
Subject: Re: Minor lmgr code cleanup
Next
From: Manfred Koizar
Date:
Subject: Re: [HACKERS] Index creation takes for ever