Skip to content

Commit

Permalink
rpm memory: Fix rpm_free() locking
Browse files Browse the repository at this point in the history
    * fix "shm_unlock()" copy-paste error
    * the ifdefs are unnecessary, as the rpm_lock/unlock macros do
      exactly that

(cherry picked from commit 4bd078f)
  • Loading branch information
liviuchircu committed May 27, 2019
1 parent 0efb9ac commit 7f05359
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions mem/rpm_mem.h
Expand Up @@ -224,13 +224,9 @@ inline static void* _rpm_realloc(void *ptr, unsigned int size,
inline static void _rpm_free(void *ptr,
const char* file, const char* function, unsigned int line)
{
#ifdef HP_MALLOC
RPM_FREE(rpm_block, ptr, file, function, line);
#else /* HP_MALLOC */
rpm_lock();
RPM_FREE(rpm_block, ptr, file, function, line);
shm_unlock();
#endif /* HP_MALLOC */
rpm_unlock();
}

#define rpm_malloc_func _rpm_malloc
Expand Down

0 comments on commit 7f05359

Please sign in to comment.