Ethereal-dev: Re: [Ethereal-dev] packet-mq v1.3 submission

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Fri, 9 Apr 2004 02:14:58 -0700
On Thu, Apr 08, 2004 at 10:10:46PM +0200, metatech wrote:
> As promised yesterday here is the next version of the MQ dissector.
> Change history :
> - No registration of port 1414, only the heuristics.
> - More dissection of pre-defined MQ structures or messages types (MSH, DH, 
> DLH, OR, RR, PMR, MDE, MQSET, MQINQ, MQPUT1, PING).

Checked in.

Warnings:

../packet-mq.c: In function `dissect_mq_md':
../packet-mq.c:660: warning: unused parameter `pinfo'
../packet-mq.c: In function `dissect_mq_or':
../packet-mq.c:727: warning: unused parameter `pinfo'
../packet-mq.c:727: warning: unused parameter `bLittleEndian'
../packet-mq.c: In function `dissect_mq_rr':
../packet-mq.c:757: warning: unused parameter `pinfo'
../packet-mq.c: In function `dissect_mq_pmr':
../packet-mq.c:787: warning: unused parameter `pinfo'
../packet-mq.c: At top level:
../packet-mq.c:153: warning: `hf_mq_inq_values' defined but not used

Is there a field that is supposed to use "hf_mq_inq_values"?

> Question : I think there was a memory leak in the previous version, because 
> I did tvb_get_string() without g_free() afterwards.
> I changed that, could you confirm it is correct now ?

There was one place where two "tvb_get_string()"s were done and later
both of the strings were freed in a row; that means that there *could*
be a leak if the second "tvb_get_string()" throws an exception - I moved
the "g_free()" of the first string before the second "tvb_get_string()",
as the string isn't used after the second "tvb_get_string()".