summaryrefslogtreecommitdiffstats
path: root/plugins/omgssapi
diff options
context:
space:
mode:
authorvarmojfekoj <theinric@redhat.com>2010-02-04 16:02:57 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2010-02-04 16:02:57 +0100
commit8c3ab2e26f1bae46ff34fc1d0a10a69c4db78127 (patch)
treefde5f05035166bb859f9be7319f70788b4edb8ef /plugins/omgssapi
parent7d098f14cba4f31dec7d92136183ebd0ccf7e1d0 (diff)
downloadrsyslog-8c3ab2e26f1bae46ff34fc1d0a10a69c4db78127.tar.gz
rsyslog-8c3ab2e26f1bae46ff34fc1d0a10a69c4db78127.tar.xz
rsyslog-8c3ab2e26f1bae46ff34fc1d0a10a69c4db78127.zip
bugfix: several smaller bugs resolved after flexelint review
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
Diffstat (limited to 'plugins/omgssapi')
-rw-r--r--plugins/omgssapi/omgssapi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/omgssapi/omgssapi.c b/plugins/omgssapi/omgssapi.c
index 361f657f..c2c08369 100644
--- a/plugins/omgssapi/omgssapi.c
+++ b/plugins/omgssapi/omgssapi.c
@@ -430,11 +430,14 @@ CODESTARTdoAction
* rgerhards, 2006-11-30
*/
dbgprintf("Compression failed, sending uncompressed message\n");
+ free(out);
} else if(destLen+1 < l) {
/* only use compression if there is a gain in using it! */
dbgprintf("there is gain in compression, so we do it\n");
psz = (char*) out;
l = destLen + 1; /* take care for the "z" at message start! */
+ } else {
+ free(out);
}
++destLen;
}
@@ -449,6 +452,12 @@ CODESTARTdoAction
break;
}
finalize_it:
+# ifdef USE_NETZIP
+ if(psz != (char*) ppString[0]) {
+ /* we need to free temporary buffer, alloced above - Naoya Nakazawa, 2010-01-11 */
+ free(psz);
+ }
+# endif
ENDdoAction