cURL cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1437 cppcheck report

From: Daniel Stenberg <bagder_at_users.sf.net>
Date: Thu, 23 Oct 2014 08:04:47 +0000

- **status**: open --> open-confirmed
- **assigned_to**: Daniel Stenberg
- **Comment**:

Thanks, the gtls.c and the vtls.c ones I agree with and have pushed fixes for just now.

The tool_getparam.c issue I just can't see how it can leak anything, can you?

---
** [bugs:#1437] cppcheck report**
**Status:** open-confirmed
**Created:** Wed Oct 22, 2014 07:27 PM UTC by serval24
**Last Updated:** Wed Oct 22, 2014 07:27 PM UTC
**Owner:** Daniel Stenberg
Hello,
I git updated curl and cppcheck (a C/C++ static code analysis tool) sources today and noticed this:
[lib/vtls/gtls.c:310]: (style) Statements following return, break, continue, goto or throw will never be executed
Indeed here's the code
    305     if((rc == GNUTLS_E_AGAIN) || (rc == GNUTLS_E_INTERRUPTED)) {
    306       connssl->connecting_state =
    307         gnutls_record_get_direction(session)?
    308         ssl_connect_2_writing:ssl_connect_2_reading;
    309       continue;
    310       if(nonblocking)
    311         return CURLE_OK;
    312     }
I also noticed these:
[lib/vtls/vtls.c:208]: (error) Uninitialized variable: r
[src/tool_getparam.c:1138]: (error) Memory leak: postdata
but perhaps false positives
Hope it helps.
Julien
---
Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
Received on 2014-10-23

These mail archives are generated by hypermail.