From 1cc2bf00e139373acef3d5f4264c76646e41268d Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Mon, 10 Feb 2014 12:24:52 -0500 Subject: [svn-r24699] Port r24463 from trunk to 1.8 branch. Tested: jam, ostrich, platypus (h5committest, apparent system issue on koala) Log from r24463: Issue 8484 - Segfault during H5Fopen of corrupt file. I put a condition check to make sure a pointer isn't NULL. Tested on jam - very simple change. --- src/H5Ocache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/H5Ocache.c b/src/H5Ocache.c index f2f1f96..3056aa7 100644 --- a/src/H5Ocache.c +++ b/src/H5Ocache.c @@ -1440,7 +1440,7 @@ H5O_chunk_proxy_dest(H5O_chunk_proxy_t *chk_proxy) HDassert(chk_proxy); /* Decrement reference count of object header */ - if(H5O_dec_rc(chk_proxy->oh) < 0) + if(chk_proxy->oh && H5O_dec_rc(chk_proxy->oh) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "can't decrement reference count on object header") /* Release the chunk proxy object */ -- cgit v0.12