[GPRS] NS/FR/GRE rcvmsg case: msgb_free() in error case

This commit is contained in:
Harald Welte 2010-05-19 15:46:49 +02:00
parent 6efc176722
commit ffe191c477
1 changed files with 2 additions and 3 deletions

View File

@ -67,11 +67,10 @@ static struct msgb *read_nsfrgre_msg(struct bsc_fd *bfd, int *error,
LOGP(DNS, LOGL_ERROR, "recv error %s during NS-FR-GRE recv\n",
strerror(errno));
*error = ret;
return NULL;
goto out_err;
} else if (ret == 0) {
msgb_free(msg);
*error = ret;
return NULL;
goto out_err;
}
msgb_put(msg, ret);