author | Sebastian Harl <sh@tokkee.org> | |
Thu, 3 Jul 2014 16:38:13 +0000 (18:38 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Thu, 3 Jul 2014 16:38:13 +0000 (18:38 +0200) | ||
commit | 6e5f65caf34e2171af701e25206d42186b7640ff | |
tree | b7b58d16a8f818ee50805e5190f8d3ec0c1d58a8 | tree | snapshot |
parent | 5c4527c3d53a349331fbcbe3bea3ad673b57889f | commit | diff |
data: Improved memory handling in data_copy().
Ensure that dynamic memory in the destination is freed before copying the new
data. That'll avoid that the caller has to use data_free_datum() first and
destroy previous data even if the copy fails.
Ensure that dynamic memory in the destination is freed before copying the new
data. That'll avoid that the caller has to use data_free_datum() first and
destroy previous data even if the copy fails.
src/core/data.c | diff | blob | history | |
src/core/store.c | diff | blob | history | |
src/include/core/data.h | diff | blob | history |