Wireshark-commits: [Wireshark-commits] master-2.4 b3f7c40: Clean up exp_pdu_open() API.

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 19 Dec 2018 07:01:08 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=b3f7c408e31d56ce803f6217608670ddc48d250e
Submitter: "Guy Harris <guy@xxxxxxxxxxxx>"
Changed: branch: master-2.4
Repository: wireshark

Commits:

b3f7c40 by Guy Harris (guy@xxxxxxxxxxxx):

    Clean up exp_pdu_open() API.
    
    It really shouldn't free the comment passed to it, as the caller
    allocated it, and knows how to free it if necessary; it might not even
    have been allocated.
    
    Make the comment argument a "const char *" to 1) allow passing string
    constants etc. and 2) to catch any attempts to free it in
    exp_pdu_open().
    
    Make the callers free it after exp_pdu_open() returns.
    
    (Alternatively, we could have exp_pdu_open() take the file name argument
    and generate the comment itself, so that all code paths generate the
    same comment.)
    
    Change-Id: I6e6924b05565761b641a6c3b4d9a2e97f4264e1b
    Ping-Bug: 15365
    Reviewed-on: https://code.wireshark.org/review/31105
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    (cherry picked from commit 05b43fc5af805dde1bdbf74dd1448690f3a10705)
    Reviewed-on: https://code.wireshark.org/review/31107
    

Actions performed:

    from  9035f52   Always set *dfp to NULL on an error return from dfilter_compile().
     add  b3f7c40   Clean up exp_pdu_open() API.


Summary of changes:
 tshark.c                 | 2 +-
 ui/export_pdu_ui_utils.c | 2 +-
 ui/tap_export_pdu.c      | 3 +--
 ui/tap_export_pdu.h      | 2 +-
 4 files changed, 4 insertions(+), 5 deletions(-)