diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-12-29 00:00:59 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-12-29 08:01:54 +0000 |
commit | ddd217469de7032a3509369b3ca7dfca55374c2e (patch) | |
tree | 781bd60b0289cd9d0c8cabfacecbe0eb8df7c76e /ui/qt | |
parent | 98456ce10f92dcb58c65ca0506c143d5e767ddd1 (diff) |
Always supply a g_mallocated error message from select_rlc_lte_session().
That way, we don't have to pass a "free this" indication separately.
While we're at it, don't just free the error message, *display* it in
all cases where rlc_graph_segment_list_get() fails.
(I wish more programming languages had a proper string type, including
some whose names consist solely of the third letter of the alphabet, but
I digress....)
Change-Id: I99f8b088aa19bc8fbb178bdb36d85ba5b89c06e0
Reviewed-on: https://code.wireshark.org/review/12902
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/qt')
-rw-r--r-- | ui/qt/lte_rlc_graph_dialog.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/ui/qt/lte_rlc_graph_dialog.cpp b/ui/qt/lte_rlc_graph_dialog.cpp index 744287a7ef..2327c89e4a 100644 --- a/ui/qt/lte_rlc_graph_dialog.cpp +++ b/ui/qt/lte_rlc_graph_dialog.cpp @@ -200,17 +200,14 @@ void LteRlcGraphDialog::findChannel() disconnect(rp, SIGNAL(mouseMove(QMouseEvent*)), this, SLOT(mouseMoved(QMouseEvent*))); char *err_string = NULL; - gboolean free_err_string = FALSE; // Rescan for channel data. rlc_graph_segment_list_free(&graph_); if (!rlc_graph_segment_list_get(cap_file_.capFile(), &graph_, graph_.channelSet, - &err_string, &free_err_string)) { + &err_string)) { // Pop up an error box to report error. simple_error_message_box("%s", err_string); - if (free_err_string) { - g_free(err_string); - } + g_free(err_string); return; } |