Skip to content

Commit f166de2

Browse files
authored
don't use delete with malloc on store
1 parent be997ab commit f166de2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/core/common/ojph_mem.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ namespace ojph {
8181
{
8282
// We should be here once only, because, in subsequent, calls we
8383
// should have size_data + size_obj <= allocated_data
84-
if (store)
85-
delete[] store;
84+
free(store);
8685
allocated_data = size_data + size_obj;
8786
allocated_data = allocated_data + (allocated_data + 19) / 20; // 5%
8887
store = malloc(allocated_data);

0 commit comments

Comments
 (0)