mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-29 16:10:52 +00:00
Fix two memleaks in the vala plugin
This commit is contained in:
parent
bed72b73b2
commit
425f5b248b
@ -148,16 +148,15 @@ R_IPI const char* r_bin_te_get_arch(struct r_bin_te_obj_t* bin) {
|
||||
case TE_IMAGE_FILE_MACHINE_POWERPCFP:
|
||||
return "ppc";
|
||||
default:
|
||||
// return "unknown";
|
||||
return "x86";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
int r_bin_te_get_bits(struct r_bin_te_obj_t* bin) {
|
||||
return 32; // It is always 32 bit by now
|
||||
}
|
||||
|
||||
|
||||
RBinAddr* r_bin_te_get_entrypoint(struct r_bin_te_obj_t* bin) {
|
||||
RBinAddr *entry = NULL;
|
||||
|
||||
@ -176,8 +175,7 @@ RBinAddr* r_bin_te_get_entrypoint(struct r_bin_te_obj_t* bin) {
|
||||
return entry;
|
||||
}
|
||||
|
||||
ut64 r_bin_te_get_image_base(struct r_bin_te_obj_t* bin)
|
||||
{
|
||||
ut64 r_bin_te_get_image_base(struct r_bin_te_obj_t* bin) {
|
||||
if (bin && bin->header) {
|
||||
return (ut64)bin->header->ImageBase;
|
||||
}
|
||||
|
@ -70,9 +70,10 @@ static bool lang_vala_file(RLang *lang, const char *file, bool silent) {
|
||||
if (r_sandbox_system (cmdbuf, 1) != 0) {
|
||||
free (libname);
|
||||
free (name);
|
||||
free (cmdbuf);
|
||||
return false;
|
||||
}
|
||||
|
||||
free (cmdbuf);
|
||||
cmdbuf = r_str_newf ("./lib%s." R_LIB_EXT, libname);
|
||||
free (libname);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user