Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7d47f26 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by Jessica Yu
Browse files

modpost: free allocated memory



valgrind complains that memory is not freed after allocation
with realloc() called from main() and write_dump().

So let us free the allocated memory properly.

Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Link: http://lkml.kernel.org/r/1470166981-6461-1-git-send-email-xypron.glpk@gmx.de


Signed-off-by: default avatarJessica Yu <jeyu@redhat.com>
parent a25f0944
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2371,6 +2371,7 @@ static void write_dump(const char *fname)
		}
	}
	write_if_changed(&buf, fname);
	free(buf.p);
}

struct ext_sym_list {
@@ -2496,6 +2497,7 @@ int main(int argc, char **argv)
			      "Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.\n");
		}
	}
	free(buf.p);

	return err;
}