]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
change response to malloc
authorBastian Dehn <hhaalo@arcor.de>
Sun, 2 Feb 2025 12:15:31 +0000 (13:15 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 2 Feb 2025 12:15:31 +0000 (13:15 +0100)
src/kds_s2000w_client.c

index d2187abd43e06b09537fc7d51460baff2d10185c..bf441ba9edf7da0655a0e84789646ba4ca039783 100644 (file)
@@ -57,7 +57,7 @@ void _kds_s2000w_client_stream_to_response(char* mem, response* resp, size_t* si
        kds_s2000w_debug_printf(ALL, "kds_s2000w_client_stream_to_response");
 
        size_t incl_null_term = *size + 1;
-       resp->data = realloc(resp->data, sizeof(char) * incl_null_term);
+       resp->data = malloc(sizeof(char) * incl_null_term);
        resp->size = incl_null_term;
        memcpy(resp->data, mem, incl_null_term);
 }