Fix build and bring back java memleak to avoid crash
This commit is contained in:
parent
69e7b3df28
commit
7ff42b590f
2 changed files with 4 additions and 4 deletions
|
|
@ -82,7 +82,7 @@ static RIODesc *__open(struct r_io_t *io, const char *file, int rw, int mode) {
|
|||
}
|
||||
fd = ret; //TODO: use r_io_fd api
|
||||
snprintf (procpidpath, sizeof (procpidpath), "/proc/%d/mem", pid);
|
||||
fd = r_sandbox_open (procpidpath, O_RDWR);
|
||||
fd = r_sandbox_open (procpidpath, O_RDWR, 0);
|
||||
if (fd != -1) {
|
||||
RIOProcpid *riop = R_NEW0 (RIOProcpid);
|
||||
if (!riop) {
|
||||
|
|
|
|||
|
|
@ -2945,8 +2945,8 @@ R_API void r_bin_java_attribute_free (void/*RBinJavaAttrInfo*/* a) {
|
|||
if (attr) {
|
||||
IFDBG eprintf ("Deleting attr %s, %p\n", attr->name, attr);
|
||||
((RBinJavaAttrMetas *) attr->metas->type_info)->allocs->delete_obj (attr);
|
||||
free (attr->metas);
|
||||
free (attr);
|
||||
//free (attr->metas);
|
||||
//free (attr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3796,7 +3796,7 @@ R_API RBinJavaAttrInfo* r_bin_java_source_code_file_attr_new (ut8 *buffer, ut64
|
|||
RBinJavaAttrInfo* attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
|
||||
offset += 6;
|
||||
if (!attr || !sz) {
|
||||
r_bin_java_attribute_free (attr);
|
||||
//free (attr); //r_bin_java_attribute_free (attr);
|
||||
return NULL;
|
||||
}
|
||||
attr->type = R_BIN_JAVA_ATTR_TYPE_SOURCE_FILE_ATTR;
|
||||
|
|
|
|||
Loading…
Reference in a new issue