lru: fix case when inserting value with larger size than allocated

This fixes a case when inserting into LRU, and the entry for given
key exists, but has allocated smaller value than what's requested.
Status Job ID Name Coverage
  Build
passed #196061
amd64 linux docker
build:clang:linux:amd64

00:00:47

passed #196060
amd64 linux docker
build:linux:amd64

00:00:47

passed #196062
amd64 linux docker allowed to fail
srpm

00:00:25

 
  Test
passed #196070
amd64 linux docker
deckard:linux:amd64

00:01:22

passed #196076
privileged
distro:epel-7

00:01:48

passed #196075
privileged
distro:fedora-29

00:02:57

passed #196069
docker
doc

00:00:49

passed #196067
dind
docker:build

00:02:07

passed #196068
amd64 linux docker
installcheck:linux:amd64

00:01:07

passed #196071
amd64 linux docker
installcheck:valgrind:linux:amd64

00:01:49

passed #196064
docker
lint:c

00:02:32

failed #196065
docker allowed to fail
lint:clang-scan-build

00:01:02

passed #196063
docker
lint:lua

00:00:41

passed #196072
docker
osx:build

00:03:01

canceled #196074
amd64 linux docker
respdiff:iter:udp:linux:amd64

passed #196066
amd64 linux docker
test:linux:amd64

00:01:06

passed #196073
amd64 linux docker
test:linux:amd64:valgrind

00:01:18

 
  Respdiff
skipped #196077
respdiff
respdiff:fwd-tls6-kresd.udp6
skipped #196078
respdiff
respdiff:fwd-udp6-kresd.udp6
skipped #196082
respdiff
respdiff:fwd-udp6-unbound.tcp6
skipped #196083
respdiff
respdiff:fwd-udp6-unbound.tls6
skipped #196081
respdiff
respdiff:fwd-udp6-unbound.udp6
skipped #196080
respdiff
respdiff:iter.tls6
skipped #196079
respdiff
respdiff:iter.udp6
skipped #196084
respdiff
resperf:fwd-tls6.udp-asan
skipped #196085
respdiff
resperf:fwd-udp6.udp-asan
skipped #196086
respdiff
resperf:iter.udp-asan
 
Name Stage Failure
failed
lint:clang-scan-build Test
  CCLD	modules/stats/stats.so
CCLD modules/bogus_log/bogus_log.so
CCLD modules/nsid/nsid.so
scan-build: 35 bugs found.
scan-build: Run 'scan-view /builds/knot/knot-resolver/scan-results/2018-11-21-132837-16-1' to examine bug reports.
Uploading artifacts...
scan-results: found 40 matching files
Uploading artifacts to coordinator... ok
id=196065 responseStatus=201 Created token=9n6ym9-x
ERROR: Job failed: exit code 1