Code

data: Improved memory handling in data_copy().
authorSebastian Harl <sh@tokkee.org>
Thu, 3 Jul 2014 16:38:13 +0000 (18:38 +0200)
committerSebastian Harl <sh@tokkee.org>
Thu, 3 Jul 2014 16:38:13 +0000 (18:38 +0200)
commit6e5f65caf34e2171af701e25206d42186b7640ff
treeb7b58d16a8f818ee50805e5190f8d3ec0c1d58a8
parent5c4527c3d53a349331fbcbe3bea3ad673b57889f
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.
src/core/data.c
src/core/store.c
src/include/core/data.h