Even more coverifix

This commit is contained in:
jvoisin 2015-06-01 23:05:44 +02:00
parent 9699ce98fa
commit 8155c6e8f2
4 changed files with 13 additions and 10 deletions

View File

@ -334,8 +334,6 @@ int main(int argc, char **argv) {
}
hashstr = (char *)out;
/* out memleaks here, hashstr can't be freed */
} else {
hashstr_len = strlen (hashstr);
}
if (from) {
if (from>=hashstr_len) {

View File

@ -149,10 +149,15 @@ static int java_revisit_bb_anal_recursive_descent(RAnal *anal, RAnalState *state
}
static int java_recursive_descent(RAnal *anal, RAnalState *state, ut64 addr) {
RAnalBlock *bb = state->current_bb;
RAnalBlock *current_head = state->current_bb_head;
if (!anal || !state || !bb || !current_head)
RAnalBlock *bb;
RAnalBlock *current_head;
if (!anal || !state || !state->current_bb || state->current_bb_head)
return 0;
bb = state->current_bb;
current_head = state->current_bb_head;
if (current_head && state->current_bb->type & R_ANAL_BB_TYPE_TAIL) {
r_anal_ex_update_bb_cfg_head_tail (current_head, current_head, state->current_bb);
}

View File

@ -128,7 +128,10 @@ R_API void r_core_syscmd_ls(const char *input) {
if (p){
off = p - path;
d = (char *) calloc (1, off+1);
if (!d) return;
if (!d) {
free (homepath);
return;
}
memcpy (d, path, off);
path = (const char *)d;
pattern = strdup (p+1);

View File

@ -48,11 +48,8 @@ static RBufferSparse *sparse_append(RList *l, ut64 addr, const ut8 *data, int le
if (!data) {
free (s);
return NULL;
}
if (data) {
memcpy (s->data, data, len);
} else {
memset (s->data, 0xff, len);
memcpy (s->data, data, len);
}
if (r_list_append (l, s) == NULL) return NULL;
return s;