Skip to content

Commit ffd587a

Browse files
committed
Apparently repalloc doesn't like a NULL ptr
1 parent f44c161 commit ffd587a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/postgresql/database_postgresql.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1718,7 +1718,7 @@ void *dbmem_zeroalloc (uint64_t size) {
17181718
}
17191719

17201720
void *dbmem_realloc (void *ptr, uint64_t new_size) {
1721-
return repalloc(ptr, new_size);
1721+
return (ptr) ? repalloc(ptr, new_size) : palloc(new_size);
17221722
}
17231723

17241724
char *dbmem_mprintf(const char *format, ...) {

0 commit comments

Comments
 (0)