aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rtps2.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2009-03-13 22:06:48 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2009-03-13 22:06:48 +0000
commit62f60df6b4966d4e3d7f478284768115ef150b20 (patch)
tree259b574936077d87b88ed6d0429ba317078e0fcc /epan/dissectors/packet-rtps2.c
parent7ed615f165fcb0cc87c2aba1921fb87a8a384ca5 (diff)
From Jakub Zawadzki (bug 3331):
g_free() is NULL safe, so we don't need check against it. svn path=/trunk/; revision=27718
Diffstat (limited to 'epan/dissectors/packet-rtps2.c')
-rw-r--r--epan/dissectors/packet-rtps2.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/epan/dissectors/packet-rtps2.c b/epan/dissectors/packet-rtps2.c
index f64126a2f3..5e2eec8155 100644
--- a/epan/dissectors/packet-rtps2.c
+++ b/epan/dissectors/packet-rtps2.c
@@ -1795,9 +1795,8 @@ static gint rtps_util_add_string(proto_tree *tree,
g_snprintf(buffer, buffer_size, "%s", retVal);
}
}
- if (retVal != NULL) {
- g_free(retVal);
- }
+ g_free(retVal);
+
/* NDDS align strings at 4-bytes word. So:
* string_length: 4 -> buffer_length = 4;
* string_length: 5 -> buffer_length = 8;