fixed 333707 Dereference before null check
This commit is contained in:
parent
8fbd0b3ee1
commit
070370895f
|
@ -1132,7 +1132,6 @@ int main(int argc, char *argv[])
|
||||||
sc_unlock(card);
|
sc_unlock(card);
|
||||||
sc_disconnect_card(card);
|
sc_disconnect_card(card);
|
||||||
}
|
}
|
||||||
if (ctx)
|
sc_release_context(ctx);
|
||||||
sc_release_context(ctx);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1117,7 +1117,6 @@ end:
|
||||||
sc_unlock(card);
|
sc_unlock(card);
|
||||||
sc_disconnect_card(card);
|
sc_disconnect_card(card);
|
||||||
}
|
}
|
||||||
if (ctx)
|
sc_release_context(ctx);
|
||||||
sc_release_context(ctx);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -232,8 +232,7 @@ dnie_tool_end:
|
||||||
sc_unlock(card);
|
sc_unlock(card);
|
||||||
sc_disconnect_card(card);
|
sc_disconnect_card(card);
|
||||||
}
|
}
|
||||||
if (ctx)
|
sc_release_context(ctx);
|
||||||
sc_release_context(ctx);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -288,8 +288,7 @@ end:
|
||||||
sc_unlock(card);
|
sc_unlock(card);
|
||||||
sc_disconnect_card(card);
|
sc_disconnect_card(card);
|
||||||
}
|
}
|
||||||
if (ctx)
|
sc_release_context(ctx);
|
||||||
sc_release_context(ctx);
|
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -909,10 +909,7 @@ int main(int argc, char *argv[])
|
||||||
action_count--;
|
action_count--;
|
||||||
}
|
}
|
||||||
end:
|
end:
|
||||||
if (card) {
|
sc_disconnect_card(card);
|
||||||
sc_disconnect_card(card);
|
sc_release_context(ctx);
|
||||||
}
|
|
||||||
if (ctx)
|
|
||||||
sc_release_context(ctx);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -662,8 +662,7 @@ end:
|
||||||
sc_unlock(card);
|
sc_unlock(card);
|
||||||
sc_disconnect_card(card);
|
sc_disconnect_card(card);
|
||||||
}
|
}
|
||||||
if (ctx)
|
sc_release_context(ctx);
|
||||||
sc_release_context(ctx);
|
|
||||||
|
|
||||||
ERR_print_errors_fp(stderr);
|
ERR_print_errors_fp(stderr);
|
||||||
return err;
|
return err;
|
||||||
|
|
|
@ -2427,11 +2427,8 @@ int main(int argc, char *argv[])
|
||||||
action_count--;
|
action_count--;
|
||||||
}
|
}
|
||||||
end:
|
end:
|
||||||
if (p15card)
|
sc_pkcs15_unbind(p15card);
|
||||||
sc_pkcs15_unbind(p15card);
|
sc_disconnect_card(card);
|
||||||
if (card)
|
sc_release_context(ctx);
|
||||||
sc_disconnect_card(card);
|
|
||||||
if (ctx)
|
|
||||||
sc_release_context(ctx);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1844,11 +1844,8 @@ int main(int argc, char *argv[])
|
||||||
fail:
|
fail:
|
||||||
err = 1;
|
err = 1;
|
||||||
end:
|
end:
|
||||||
if (card) {
|
sc_disconnect_card(card);
|
||||||
sc_disconnect_card(card);
|
sc_release_context(ctx);
|
||||||
}
|
|
||||||
if (ctx)
|
|
||||||
sc_release_context(ctx);
|
|
||||||
|
|
||||||
ERR_print_errors_fp(stderr);
|
ERR_print_errors_fp(stderr);
|
||||||
return err;
|
return err;
|
||||||
|
|
Loading…
Reference in New Issue