Commit 1cf4b38b authored by Milan Crha's avatar Milan Crha

[NNTP] Address REVERSE_INULL Coverity scan issue

src/camel/providers/nntp/camel-nntp-store.c:2252: deref_ptr: Directly dereferencing pointer "nntp_stream"
src/camel/providers/nntp/camel-nntp-store.c:2355: check_after_deref: Null-checking "nntp_stream" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
  2353|
  2354|   		if (ret == -1) {
  2355|-> 			if (nntp_stream)
  2356|   				camel_nntp_stream_unlock (nntp_stream);
  2357|
parent 4565d18a
......@@ -2243,7 +2243,14 @@ camel_nntp_command (CamelNNTPStore *nntp_store,
/* If we successfully connected then
* we should obtain a CamelNNTPStream. */
nntp_stream = camel_nntp_store_ref_stream (nntp_store);
g_return_val_if_fail (nntp_stream != NULL, -1);
if (!nntp_stream) {
g_set_error (
error, CAMEL_SERVICE_ERROR,
CAMEL_SERVICE_ERROR_NOT_CONNECTED,
_("Not connected."));
ret = -1;
goto exit;
}
}
camel_nntp_stream_lock (nntp_stream);
......@@ -2352,9 +2359,7 @@ camel_nntp_command (CamelNNTPStore *nntp_store,
}
if (ret == -1) {
if (nntp_stream)
camel_nntp_stream_unlock (nntp_stream);
camel_nntp_stream_unlock (nntp_stream);
g_clear_object (&nntp_stream);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment