1 Star 0 Fork 31

houyingchao/clamav

forked from src-openEuler/clamav 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
clamav-return-val-process.patch 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
From fe45bca164deeb1be053f5755546d71cc5dfd89b Mon Sep 17 00:00:00 2001
From: caodongxia <315816521@qq.com>
Date: Mon, 9 Aug 2021 14:27:22 +0800
Subject: [PATCH] fix-return-val-process
---
clamonacc/client/client.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/clamonacc/client/client.c b/clamonacc/client/client.c
index 347070f..71c153d 100644
--- a/clamonacc/client/client.c
+++ b/clamonacc/client/client.c
@@ -207,12 +207,12 @@ int16_t onas_ping_clamd(struct onas_context **ctx)
if (opt) {
attempt_str = cli_strdup(opt->strarg);
+ if (NULL == attempt_str) {
+ logg("!could not allocate memory for string\n");
+ ret = -1;
+ goto done;
+ }
if (attempt_str) {
- if (NULL == attempt_str) {
- logg("!could not allocate memory for string\n");
- ret = -1;
- goto done;
- }
interval_str = strchr(attempt_str, ':');
if ((NULL != interval_str) && (interval_str[0] != '\0')) {
interval_str[0] = '\0';
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/houyingchao/clamav.git
git@gitee.com:houyingchao/clamav.git
houyingchao
clamav
clamav
master

搜索帮助