fix minor memory leak with default bootimage symbols

This commit is contained in:
Joshua Warner 2012-05-11 09:06:51 -06:00
parent 3dcf886bbe
commit 362d6594a8

View File

@ -1826,10 +1826,10 @@ public:
entryClass(0),
entryMethod(0),
entrySpec(0),
bootimageStart(strdup("_binary_bootimage_bin_start")),
bootimageEnd(strdup("_binary_bootimage_bin_end")),
codeimageStart(strdup("_binary_codeimage_bin_start")),
codeimageEnd(strdup("_binary_codeimage_bin_end"))
bootimageStart(0),
bootimageEnd(0),
codeimageStart(0),
codeimageEnd(0)
{
ArgParser parser;
Arg classpath(parser, true, "cp", "<classpath>");
@ -1870,6 +1870,22 @@ public:
exit(1);
}
if(!bootimageStart) {
bootimageStart = strdup("_binary_bootimage_bin_start");
}
if(!bootimageEnd) {
bootimageEnd = strdup("_binary_bootimage_bin_end");
}
if(!codeimageStart) {
codeimageStart = strdup("_binary_codeimage_bin_start");
}
if(!codeimageEnd) {
codeimageEnd = strdup("_binary_codeimage_bin_end");
}
}
~Arguments() {