…
+++ b/drivers/crypto/hisilicon/qm.c…
@@ -1420,16 +1420,17 @@ static int qm_dbg_help(struct hisi_qm *qm, char *s)
+ s_tmp = s;
presult = strsep(&s, " ");
if (!presult) {
- kfree(s);
+ kfree(s_tmp);
return -EINVAL;
}
- kfree(s);
- return -EINVAL;
+ ret = -EINVAL;
+ goto free_tmp;
I suggest to add a jump target for the desired exception handling.
Regards,
Markus
.