提交 60870d3a 编写于 作者: A antirez

Jump to right label on AOF parsing error.

Related to #6054.
上级 d90f599b
...@@ -782,12 +782,14 @@ int loadAppendOnlyFile(char *filename) { ...@@ -782,12 +782,14 @@ int loadAppendOnlyFile(char *filename) {
for (j = 0; j < argc; j++) { for (j = 0; j < argc; j++) {
/* Parse the argument len. */ /* Parse the argument len. */
if (fgets(buf,sizeof(buf),fp) == NULL || char *readres = fgets(buf,sizeof(buf),fp);
buf[0] != '$') if (readres == NULL || buf[0] != '$') {
{
fakeClient->argc = j; /* Free up to j-1. */ fakeClient->argc = j; /* Free up to j-1. */
freeFakeClientArgv(fakeClient); freeFakeClientArgv(fakeClient);
goto readerr; if (readres == NULL)
goto readerr;
else
goto fmterr;
} }
len = strtol(buf+1,NULL,10); len = strtol(buf+1,NULL,10);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册