mirror of
https://github.com/xzeldon/htop.git
synced 2025-01-31 09:07:25 +03:00
Fix Hashtable_put to allow storing the same pointer
This commit is contained in:
parent
f4439b1b60
commit
e5fdb80c7d
@ -88,7 +88,7 @@ void Hashtable_put(Hashtable* this, unsigned int key, void* value) {
|
||||
this->items++;
|
||||
break;
|
||||
} else if ((*bucketPtr)->key == key) {
|
||||
if (this->owner)
|
||||
if (this->owner && (*bucketPtr)->value != value)
|
||||
free((*bucketPtr)->value);
|
||||
(*bucketPtr)->value = value;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user