Fix COVs
This commit is contained in:
parent
e40fe434bb
commit
53badd517d
5 changed files with 21 additions and 5 deletions
|
|
@ -401,9 +401,12 @@ static int meta_print_item(void *user, const char *k, const char *v) {
|
|||
it.str = strchr (v2+1, ',');
|
||||
if (it.str)
|
||||
it.str = (char *)sdb_decode ((const char*)it.str+1, 0);
|
||||
else it.str = strdup (it.str); // don't break in free
|
||||
printmetaitem (ui->anal, &it, ui->rad);
|
||||
beach:
|
||||
free (it.str);
|
||||
|
||||
beach:
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
@ -439,7 +442,10 @@ static int meta_enumerate_cb(void *user, const char *k, const char *v) {
|
|||
it->from = sdb_atoi (k+7);
|
||||
it->to = it->from + it->size;
|
||||
v2 = strchr (v, ',');
|
||||
if (!v2) goto beach;
|
||||
if (!v2) {
|
||||
free (it);
|
||||
goto beach;
|
||||
}
|
||||
it->space = atoi (v2+1);
|
||||
it->str = strchr (v2+1, ',');
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ struct r_bin_mz_segment_t * r_bin_mz_get_segments(
|
|||
segments = calloc (num_relocs, sizeof(*segments));
|
||||
if (segments == NULL) {
|
||||
eprintf ("Error: calloc (segments)\n");
|
||||
btree_cleartree (tree, NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -356,7 +356,10 @@ static int get_cgnodes(AGraph *g) {
|
|||
|
||||
RFlagItem *fi = r_flag_get_at (g->core->flags, ref->addr);
|
||||
node = R_NEW0 (ANode);
|
||||
if (!node) return R_FALSE;
|
||||
if (!node) {
|
||||
sdb_free (g_nodes);
|
||||
return R_FALSE;
|
||||
}
|
||||
if (fi) {
|
||||
node->text = strdup (fi->name);
|
||||
node->text = r_str_concat (node->text, ":\n");
|
||||
|
|
|
|||
|
|
@ -4,9 +4,12 @@
|
|||
|
||||
R_API RQueue *r_queue_new (int n) {
|
||||
RQueue *q = R_NEW0 (RQueue);
|
||||
if (!q) return NULL;
|
||||
q->elems = R_NEWS0 (void *, n);
|
||||
if (!q->elems)
|
||||
if (!q->elems){
|
||||
free (q);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
q->front = 0;
|
||||
q->rear = -1;
|
||||
|
|
|
|||
|
|
@ -4,9 +4,12 @@
|
|||
|
||||
R_API RStack *r_stack_new (unsigned int n) {
|
||||
RStack *s = R_NEW0 (RStack);
|
||||
if (!s) return NULL;
|
||||
s->elems = R_NEWS0 (void *, n);
|
||||
if (!s->elems)
|
||||
if (!s->elems){
|
||||
free (s);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
s->n_elems = n;
|
||||
s->top = -1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue