Commit 5d127727 by Libo Chen Committed by Serge Hallyn

lxc-user-nic: fix the wrong use of realloc

fix the wrong use of realloc Signed-off-by: 's avatarLibo Chen <clbchenlibo.chen@huawei.com> Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent a3b47c09
......@@ -318,7 +318,7 @@ static bool cull_entries(int fd, char *me, char *t, char *br)
p = buf;
e = buf + len;
while ((p = find_line(p, e, me, t, br)) != NULL) {
struct entry_line *newe = realloc(entry_lines, n+1);
struct entry_line *newe = realloc(entry_lines, sizeof(*entry_lines)*(n+1));
if (!newe) {
free(entry_lines);
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment