]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
change free curl open session fail
authorBastian Dehn <hhaalo@arcor.de>
Wed, 15 Oct 2025 06:02:15 +0000 (08:02 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Wed, 15 Oct 2025 06:02:15 +0000 (08:02 +0200)
src/kds_s2000w_client.c

index 6b9fe3e182a061bda6cb0e03da7eb6d3823e1c94..14b642329164e9d16ea0ee2e67d6ef0a24d142e8 100644 (file)
@@ -183,6 +183,8 @@ uint8_t kds_s2000w_client_open_session(response* resp)
 
        char* body = malloc(sizeof(char) * MAX_STR_BUFFER_LENGTH);
        if (body == NULL) {
+               curl_easy_cleanup(curl);
+               curl = NULL;
                curl_url_cleanup(url_handler);
                url_handler = NULL;
                curl_slist_free_all(headers);