mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-30 08:30:53 +00:00
Fix last covs
This commit is contained in:
parent
c778d8cf4b
commit
e96de87e90
@ -2375,10 +2375,12 @@ static RListIter *collision_skip_unused(RListIter *iter, RSignType *used) {
|
||||
RListIter *next;
|
||||
while ((next = r_list_iter_get_next (iter))) {
|
||||
n = r_list_iter_get_data (next);
|
||||
RSignType t = n[0];
|
||||
if (!n || skip != t) {
|
||||
if (type_in_array (used, t)) {
|
||||
return iter;
|
||||
if (n) {
|
||||
RSignType t = n[0];
|
||||
if (skip != t) {
|
||||
if (type_in_array (used, t)) {
|
||||
return iter;
|
||||
}
|
||||
}
|
||||
}
|
||||
iter = next;
|
||||
|
@ -96,7 +96,9 @@ static void handle_luhn(const ut8 *block, int len) {
|
||||
}
|
||||
|
||||
static void handle_ssdeep(const ut8 *block, int len) {
|
||||
r_cons_printf ("%s\n", r_hash_ssdeep (block, len));
|
||||
char *res = r_hash_ssdeep (block, len);
|
||||
r_cons_printf ("%s\n", res);
|
||||
free (res);
|
||||
}
|
||||
|
||||
static void handle_crc8_smbus(const ut8 *block, int len) {
|
||||
|
@ -2521,7 +2521,7 @@ static int ds_disassemble(RDisasmState *ds, ut8 *buf, int len) {
|
||||
char *op_hex = r_asm_op_get_hex (&ds->asmop);
|
||||
r_asm_op_set_asm (&ds->asmop, sdb_fmt (".hex %s%s", op_hex, tail));
|
||||
bool be = ds->core->print->big_endian;
|
||||
int immbase = (ds && ds->hint && ds->hint->immbase)? ds->hint->immbase: 0;
|
||||
int immbase = (ds->hint && ds->hint->immbase)? ds->hint->immbase: 0;
|
||||
switch (meta_size) {
|
||||
case 2:
|
||||
ds->analop.val = r_read_ble16 (buf, be);
|
||||
|
@ -15,9 +15,11 @@ typedef struct {
|
||||
|
||||
|
||||
static void free_socketdata(RIOSocketData *sd) {
|
||||
r_socket_free (sd->sc);
|
||||
r_socket_free (sd->sl);
|
||||
free (sd);
|
||||
if (sd) {
|
||||
r_socket_free (sd->sc);
|
||||
r_socket_free (sd->sl);
|
||||
free (sd);
|
||||
}
|
||||
}
|
||||
|
||||
static int __write(RIO *io, RIODesc *desc, const ut8 *buf, int count) {
|
||||
@ -119,12 +121,14 @@ static RIODesc *__open(RIO *io, const char *pathname, int rw, int mode) {
|
||||
} else {
|
||||
eprintf ("Missing port.\n");
|
||||
free_socketdata (data);
|
||||
free (host);
|
||||
return NULL;
|
||||
}
|
||||
/* listen and wait for connection */
|
||||
data->sc = r_socket_new (false);
|
||||
if (!r_socket_connect (data->sc, host, port, R_SOCKET_PROTO_TCP, 0)) {
|
||||
eprintf ("Cannot connect\n");
|
||||
free (host);
|
||||
free_socketdata (data);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user