mcxt.c

From: "Mendola Gaetano" <mendola(at)bigfoot(dot)com>
To: <pgsql-patches(at)postgresql(dot)org>
Subject: mcxt.c
Date: 2003-09-07 16:54:23
Message-ID: 000701c37560$b2111500$f3710b3e@mm.eutelsat.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers 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 ----

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Manfred Koizar 2003-09-07 17:16:24 Re: [HACKERS] Index creation takes for ever
Previous Message Peter Eisentraut 2003-09-07 16:36:47 Re: Notices for redundant operations

Browse pgsql-patches by date

  From Date Subject
Next Message Manfred Koizar 2003-09-07 17:16:24 Re: [HACKERS] Index creation takes for ever
Previous Message Manfred Koizar 2003-09-07 16:47:55 Re: Minor lmgr code cleanup