Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64fa732d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mm-audio: Remove malloc allocation for ptr pointer" into audio-hal.lnx.5.1

parents 6210474b 64faef1e
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -278,12 +278,6 @@ int get_input_and_validate(char *input, datatype type)
        status = -1;
        goto exit;
    }
    ptr = (char *)malloc(strlen(input) + 1);
    if (ptr == NULL) {
        DEBUG_PRINT("Low memory\n");
        status = -1;
        goto exit;
    }
    /* Check for negative input */
    if (*input == '-') {
        DEBUG_PRINT("Negative Number is not allowed\n");
@@ -322,8 +316,6 @@ int get_input_and_validate(char *input, datatype type)
            break;
    }
exit:
    if (ptr != NULL)
        free(ptr);
    if (status != 0)
        exit(0);
    return value;
+0 −8
Original line number Diff line number Diff line
@@ -291,12 +291,6 @@ int get_input_and_validate(char *input, datatype type)
        status = -1;
        goto exit;
    }
    ptr = (char *)malloc(strlen(input) + 1);
    if (ptr == NULL) {
        DEBUG_PRINT("Low memory\n");
        status = -1;
        goto exit;
    }
    /* Check for negative input */
    if (*input == '-') {
        DEBUG_PRINT("Negative Number is not allowed\n");
@@ -335,8 +329,6 @@ int get_input_and_validate(char *input, datatype type)
            break;
    }
exit:
    if (ptr != NULL)
        free(ptr);
    if (status != 0)
        exit(0);
    return value;
+0 −8
Original line number Diff line number Diff line
@@ -290,12 +290,6 @@ int get_input_and_validate(char *input, datatype type)
        status = -1;
        goto exit;
    }
    ptr = (char *)malloc(strlen(input) + 1);
    if (ptr == NULL) {
        DEBUG_PRINT("Low memory\n");
        status = -1;
        goto exit;
    }
    /* Check for negative input */
    if (*input == '-') {
        DEBUG_PRINT("Negative Number is not allowed\n");
@@ -334,8 +328,6 @@ int get_input_and_validate(char *input, datatype type)
            break;
    }
exit:
    if (ptr != NULL)
        free(ptr);
    if (status != 0)
        exit(0);
    return value;