ports/databases/db5/files/patch-src_heap_heap__verify.c
Matthias Andree 7a68cdcef2 Avoid junk pointer when __db_vrfy_datapage() fails
Rather than second-guessing what the __os_free() might be doing and
avoiding it, initialize the pointer to NULL, which __os_free() will
skip.  This should be the safer approach if Oracle ever patches other
parts of db 5.3.

PR:		210829
Submitted by:	Mark Millard
2016-11-09 22:31:48 +00:00

11 lines
341 B
C

--- src/heap/heap_verify.c.orig 2013-09-09 15:35:08 UTC
+++ src/heap/heap_verify.c
@@ -122,7 +122,7 @@ __heap_vrfy(dbp, vdp, h, pgno, flags)
{
HEAPHDR *hdr;
int cnt, i, j, ret;
- db_indx_t *offsets, *offtbl, end;
+ db_indx_t *offsets = NULL, *offtbl, end;
if ((ret = __db_vrfy_datapage(dbp, vdp, h, pgno, flags)) != 0)
goto err;