From c3c59b010bf1350da595025c0a214756992e6c24 Mon Sep 17 00:00:00 2001 From: Mickael Savinaud Date: Thu, 15 Nov 2012 16:37:57 +0000 Subject: [PATCH] [trunk] solve a potential bug when we test the realloc --- src/lib/openjp2/tgt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/openjp2/tgt.c b/src/lib/openjp2/tgt.c index c82b06ed..06930d49 100644 --- a/src/lib/openjp2/tgt.c +++ b/src/lib/openjp2/tgt.c @@ -170,7 +170,7 @@ opj_tgt_tree_t *opj_tgt_init(opj_tgt_tree_t * p_tree,OPJ_UINT32 p_num_leafs_h, O if (l_node_size > p_tree->nodes_size) { opj_tgt_node_t* new_nodes = (opj_tgt_node_t*) opj_realloc(p_tree->nodes, l_node_size); - if (! p_tree->nodes) { + if (! new_nodes) { fprintf(stderr, "ERROR Not enough memory to reinitialize the tag tree\n"); opj_tgt_destroy(p_tree); return 00;