*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.56 2001/05/27 09:59:29 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.57 2001/06/01 19:52:24 tgl Exp $
*
*-------------------------------------------------------------------------
*/
* as the backend does, so we use plain malloc for them.
*/
elm = (SeqTable) malloc(sizeof(SeqTableData));
- elm->name = malloc(strlen(name) + 1);
- strcpy(elm->name, name);
+ if (elm == NULL)
+ elog(ERROR, "Memory exhausted in init_sequence");
+ elm->name = strdup(name);
+ if (elm->name == NULL)
+ elog(ERROR, "Memory exhausted in init_sequence");
elm->rel = seqrel;
elm->relid = RelationGetRelid(seqrel);
elm->cached = elm->last = elm->increment = 0;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.21 2001/02/10 02:31:26 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.22 2001/06/01 19:54:58 tgl Exp $
*
*-------------------------------------------------------------------------
*/
Dllist *l;
l = (Dllist *) malloc(sizeof(Dllist));
+ if (l == NULL)
+ elog(ERROR, "Memory exhausted in DLNewList");
l->dll_head = 0;
l->dll_tail = 0;
Dlelem *e;
e = (Dlelem *) malloc(sizeof(Dlelem));
+ if (e == NULL)
+ elog(ERROR, "Memory exhausted in DLNewElem");
e->dle_next = 0;
e->dle_prev = 0;
e->dle_val = val;