diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2005-09-23 10:38:32 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2005-09-23 10:38:32 +0000 |
commit | e9239af79ce9e5ab6950f0fa984de3b6f9f65449 (patch) | |
tree | 862ebf1295c5cceda9f79bc7915c6a2117351b84 /syslogd.c | |
parent | 8f0c0ae6d2f605df5b2598af4db4a20ed0eef30b (diff) | |
download | rsyslog-e9239af79ce9e5ab6950f0fa984de3b6f9f65449.tar.gz rsyslog-e9239af79ce9e5ab6950f0fa984de3b6f9f65449.tar.xz rsyslog-e9239af79ce9e5ab6950f0fa984de3b6f9f65449.zip |
small fix in escapefunction, finishing touches for 1.10.1v1-10-1
Diffstat (limited to 'syslogd.c')
-rw-r--r-- | syslogd.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -3677,8 +3677,7 @@ void doSQLEscape(char **pp, size_t *pLen, unsigned short *pbMustBeFreed, int esc if(rsCStrAppendChar(pStrB, (escapeMode == 0) ? '\'' : '\\') != RS_RET_OK) { doSQLEmergencyEscape(*pp, escapeMode); rsCStrFinish(pStrB); - if((pszGenerated = rsCStrConvSzStrAndDestruct(pStrB)) - != NULL) + if((pszGenerated = rsCStrConvSzStrAndDestruct(pStrB)) != NULL) free(pszGenerated); return; } @@ -3687,8 +3686,7 @@ void doSQLEscape(char **pp, size_t *pLen, unsigned short *pbMustBeFreed, int esc if(rsCStrAppendChar(pStrB, '\\') != RS_RET_OK) { doSQLEmergencyEscape(*pp, escapeMode); rsCStrFinish(pStrB); - if((pszGenerated = rsCStrConvSzStrAndDestruct(pStrB)) - != NULL) + if((pszGenerated = rsCStrConvSzStrAndDestruct(pStrB)) != NULL) free(pszGenerated); return; } @@ -3697,11 +3695,9 @@ void doSQLEscape(char **pp, size_t *pLen, unsigned short *pbMustBeFreed, int esc if(rsCStrAppendChar(pStrB, *p) != RS_RET_OK) { doSQLEmergencyEscape(*pp, escapeMode); rsCStrFinish(pStrB); - if((pszGenerated = rsCStrConvSzStrAndDestruct(pStrB)) - != NULL) { + if((pszGenerated = rsCStrConvSzStrAndDestruct(pStrB)) != NULL) free(pszGenerated); - return; - } + return; } ++p; } |