diff options
author | Martin Mathieson <martin.mathieson@keysight.com> | 2020-05-03 13:15:52 +0100 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2020-05-03 19:04:30 +0000 |
commit | 6ba8bd037f46b7dbb0e82ca79ad1d0cfbbe0eda9 (patch) | |
tree | 571cd9b2a9b00a7ee31a29629b678f848d0f584e /wsutil | |
parent | 60622e63fd561830e1de24e28ae4e5f7952ed130 (diff) |
Some more issues identified by PVS-Studio.
/opt/SourceCode/wireshark/epan/dissectors/packet-osc.c 367 err V562 It's odd to compare 0 or 1 with a value of 0.
/opt/SourceCode/wireshark/epan/dissectors/packet-rpc.c 960 note V576 Incorrect format. Consider checking the eighth actual argument of the 'proto_tree_add_subtree_format' function. The SIGNED integer type argument is expected.
/opt/SourceCode/wireshark/epan/dissectors/packet-rpc.c 980 note V576 Incorrect format. Consider checking the third actual argument of the 'proto_item_append_text' function. The SIGNED integer type argument is expected.
/opt/SourceCode/wireshark/epan/dissectors/packet-rpc.c 2473 note V576 Incorrect format. Consider checking the fourth actual argument of the 'col_prepend_fstr' function. The SIGNED integer type argument is expected.
/opt/SourceCode/wireshark/epan/dissectors/packet-rpc.c 2482 note V576 Incorrect format. Consider checking the fourth actual argument of the 'col_append_fstr' function. The SIGNED integer type argument is expected.
/opt/SourceCode/wireshark/epan/dissectors/packet-rpc.c 2633 note V576 Incorrect format. Consider checking the fourth actual argument of the 'col_append_fstr' function. The SIGNED integer type argument is expected.
/opt/SourceCode/wireshark/epan/dissectors/packet-rpc.c 2650 note V576 Incorrect format. Consider checking the fourth actual argument of the 'col_prepend_fstr' function. The SIGNED integer type argument is expected.
/opt/SourceCode/wireshark/epan/dissectors/packet-stun.c 565 warn V1051 Consider checking for misprints. It's possible that the 'reported_length' should be checked here.
/opt/SourceCode/wireshark/epan/dissectors/packet-umts_fp.c 4126 warn V1051 Consider checking for misprints. It's possible that the 'reported_length' should be checked here.
/opt/SourceCode/wireshark/epan/dissectors/packet-umts_fp.c 4942 warn V1051 Consider checking for misprints. It's possible that the 'reported_length' should be checked here.
/opt/SourceCode/wireshark/ui/voip_calls.c 1444 err V773 The 'comment' pointer was assigned values twice without releasing the memory. A memory leak is possible.
/opt/SourceCode/wireshark/wsutil/filesystem.c 1531 err V773 The function was exited without releasing the 'files' pointer. A memory leak is possible.
/opt/SourceCode/wireshark/wsutil/filesystem.c 1717 err V773 The function was exited without releasing the 'files' pointer. A memory leak is possible.
Bug: 16335
Change-Id: I8df3ba6d070823dcb43c4152d9156358f701e8dc
Reviewed-on: https://code.wireshark.org/review/37069
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
Diffstat (limited to 'wsutil')
-rw-r--r-- | wsutil/filesystem.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/wsutil/filesystem.c b/wsutil/filesystem.c index 3526ac1fbb..bf899f67a6 100644 --- a/wsutil/filesystem.c +++ b/wsutil/filesystem.c @@ -1528,7 +1528,7 @@ reset_default_profile(char **pf_dir_path_return) if (ret != 0) { *pf_dir_path_return = profile_dir; g_free(del_file); - return ret; + break; } } @@ -1538,7 +1538,7 @@ reset_default_profile(char **pf_dir_path_return) g_list_free(files); g_free(profile_dir); - return 0; + return ret; } int @@ -1694,6 +1694,7 @@ int copy_persconffile_profile(const char *toname, const char *fromname, gboolean from_global, char **pf_filename_return, char **pf_to_dir_path_return, char **pf_from_dir_path_return) { + int ret = 0; gchar *from_dir; gchar *to_dir = get_persconffile_dir(toname); gchar *filename, *from_file, *to_file; @@ -1714,7 +1715,8 @@ copy_persconffile_profile(const char *toname, const char *fromname, gboolean fro *pf_from_dir_path_return = from_dir; g_free (from_file); g_free (to_file); - return -1; + ret = -1; + break; } g_free (from_file); @@ -1727,7 +1729,7 @@ copy_persconffile_profile(const char *toname, const char *fromname, gboolean fro g_free (from_dir); g_free (to_dir); - return 0; + return ret; } /* |