mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Modify pg_dump to use error-free memory allocation macros. This avoids
ignoring errors and call-site error checking.
This commit is contained in:
@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "pg_backup_archiver.h"
|
||||
#include "common.h"
|
||||
#include "dumputils.h"
|
||||
|
||||
#include <unistd.h> /* for dup */
|
||||
@ -67,9 +68,7 @@ InitArchiveFmt_Null(ArchiveHandle *AH)
|
||||
|
||||
/* Initialize LO buffering */
|
||||
AH->lo_buf_size = LOBBUFSIZE;
|
||||
AH->lo_buf = (void *) malloc(LOBBUFSIZE);
|
||||
if (AH->lo_buf == NULL)
|
||||
die_horribly(AH, NULL, "out of memory\n");
|
||||
AH->lo_buf = (void *) pg_malloc(LOBBUFSIZE);
|
||||
|
||||
/*
|
||||
* Now prevent reading...
|
||||
|
Reference in New Issue
Block a user