Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
return CRYPTO_SUCCESS;\r
}\r
\r
- if (BN_Quotient == NULL)\r
+ if (BN_Quotient == NULL && BN_Remainder != NULL)\r
{\r
BN_Remainder->Length = temp_Divisor->Length;\r
\r
void local_socket_close(SDB_SOCKET *s)
{
+ if (s == NULL) {
+ D("ERROR! SDB_SOCKET s is null.\n");
+ return;
+ }
D("LS(%X) FD(%d)\n", s->local_id, s->fd);
if(HAS_SOCKET_STATUS(s, NOTIFY)) {
D("LS(%X) fail to send notify\n", s->local_id);
allocated = (tl / w) * 1.5 + 1;
line = (char **) malloc(sizeof(char *) * allocated);
- len = (int *) malloc(sizeof(int) * allocated);
+ if (line == NULL) {
+ return 0;
+ }
- if (line == NULL || len == NULL)
+ len = (int *) malloc(sizeof(int) * allocated);
+ if (len == NULL) {
+ free(line);
return 0;
+ }
/*
p will be an offset from the start of the string and the start of