projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4dbbd7
)
clone_z_type: fix leak; occurred for enc failures
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 17 Dec 2009 14:13:56 +0000
(15:13 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 17 Dec 2009 14:13:56 +0000
(15:13 +0100)
src/copy_types.c
patch
|
blob
|
history
diff --git
a/src/copy_types.c
b/src/copy_types.c
index
73519f1
..
b15536a
100644
(file)
--- a/
src/copy_types.c
+++ b/
src/copy_types.c
@@
-16,9
+16,7
@@
Z_##x *yaz_clone_z_##x(Z_##x *q, NMEM nmem_out) \
Z_##x *q1 = 0; \
ODR enc = odr_createmem(ODR_ENCODE); \
ODR dec = odr_createmem(ODR_DECODE); \
- if (!z_##x(enc, &q, 0, 0)) \
- return 0; \
- else \
+ if (z_##x(enc, &q, 0, 0)) \
{ \
int len; \
char *buf = odr_getbuf(enc, &len, 0); \