summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2015-11-25 17:20:11 +0100
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2015-11-25 20:07:40 +0000
commit57f317187be3d6f8ee71362fe585285d77c99714 (patch)
tree8ebee4817a11c8da2aac137100bb5b3c686edb84
parenta17866f1fd1317b05265622b0f24f0e551a9da67 (diff)
downloadwireshark-57f317187be3d6f8ee71362fe585285d77c99714.tar.gz
qt: move file close (CID 1159303)
Change-Id: Ib21327babc77324313a1b3e2dd6ba0987a8fb333 Reviewed-on: https://code.wireshark.org/review/12144 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> (cherry picked from commit b314342c0043d411912a7aff339d8cdd6ee413aa) Reviewed-on: https://code.wireshark.org/review/12154
-rw-r--r--ui/qt/sctp_chunk_statistics_dialog.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/qt/sctp_chunk_statistics_dialog.cpp b/ui/qt/sctp_chunk_statistics_dialog.cpp
index a92872a47c..8642a7bd94 100644
--- a/ui/qt/sctp_chunk_statistics_dialog.cpp
+++ b/ui/qt/sctp_chunk_statistics_dialog.cpp
@@ -93,7 +93,7 @@ void SCTPChunkStatisticsDialog::initializeChunkMap()
void SCTPChunkStatisticsDialog::fillTable(bool all)
{
- FILE* fp;
+ FILE* fp = NULL;
pref_t *pref = prefs_find_preference(prefs_find_module("sctp"),"statistics_chunk_types");
uat_t *uat = pref->varp.uat;
@@ -187,8 +187,9 @@ void SCTPChunkStatisticsDialog::fillTable(bool all)
j++;
}
}
- fclose(fp);
}
+ if (fp)
+ fclose(fp);
}
void SCTPChunkStatisticsDialog::contextMenuEvent( QContextMenuEvent * event)