Dictionary: Fix double free error
commit91473e8e9c9847cebba67efa5eb12e1f115d106e
authorSaúl Valdelvira <saul@saulv.es>
Mon, 12 Feb 2024 23:39:14 +0000 (13 00:39 +0100)
committerSaúl Valdelvira <saul@saulv.es>
Mon, 12 Feb 2024 23:41:36 +0000 (13 00:41 +0100)
tree54be0cf6477b9ae1b87e1717c6c75713afb6f102
parent0a0955e064637b5bfb705f1407933e43abf7fec0
Dictionary: Fix double free error

When removing an element from the Dictionary, the destructor was being
called. This caused it to be called again when freeing the Dictionary.
Instead of callign the destructor right away, wait until we need to use
the spot again, on dict_put, and call the destructor there.
src/Dictionary.c