forked from osmocom/wireshark
If no error is returned by a Wiretap routine, err_info is presumed not
to have been set. Do not set it to something g_mallocated in that case, as that will cause a memory leak - the error string will not be freed by the caller, as it's presumed not to have been set. svn path=/trunk/; revision=31001
This commit is contained in:
parent
0c00e3be4e
commit
d393e03e07
|
@ -673,7 +673,7 @@ gboolean nstrace_read_v10(wtap *wth, int *err, gchar **err_info, gint64 *data_of
|
|||
nspr_pktracepart_v10_t *pp;
|
||||
|
||||
*err = 0;
|
||||
*err_info = g_strdup_printf("nstrace: no error");
|
||||
*err_info = NULL;
|
||||
do
|
||||
{
|
||||
while ((nstrace_buf_offset < nstrace_buflen) &&
|
||||
|
@ -828,7 +828,7 @@ gboolean nstrace_read_v20(wtap *wth, int *err, gchar **err_info, gint64 *data_of
|
|||
nspr_pktracefull_v21_t *fp21;
|
||||
|
||||
*err = 0;
|
||||
*err_info = g_strdup_printf("nstrace: no error");
|
||||
*err_info = NULL;
|
||||
do
|
||||
{
|
||||
while ((nstrace_buf_offset < nstrace_buflen) &&
|
||||
|
|
Loading…
Reference in New Issue