aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2011-05-04 21:19:04 +0000
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2011-05-04 21:19:04 +0000
commitd621e6acbea361c0a7c454b018f09f87dbc75de5 (patch)
tree54071908d341dd68235d7587606e255742236e9d
parent669162b440d70e615284d8c504d64ec5bf947b1b (diff)
Cleanup: g_malloc can't return NULL, remove checks for them.
XXX, should this code use g_try_malloc instead? svn path=/trunk/; revision=36988
-rw-r--r--epan/dissectors/packet-iwarp-mpa.c3
-rw-r--r--epan/dissectors/packet-spnego.c2
-rw-r--r--epan/dissectors/packet-ssl-utils.c4
-rw-r--r--tap-iostat.c4
4 files changed, 0 insertions, 13 deletions
diff --git a/epan/dissectors/packet-iwarp-mpa.c b/epan/dissectors/packet-iwarp-mpa.c
index 45ab48d372..ec85288d90 100644
--- a/epan/dissectors/packet-iwarp-mpa.c
+++ b/epan/dissectors/packet-iwarp-mpa.c
@@ -310,9 +310,6 @@ remove_markers(tvbuff_t *tvb, packet_info *pinfo, guint32 marker_offset,
mfree_buff_length = orig_length - (MPA_MARKER_LEN * num_markers);
mfree_buff = g_malloc(mfree_buff_length);
- if (!mfree_buff)
- THROW(OutOfMemoryError);
-
tot_copy = 0;
source_offset = 0;
cur_copy = marker_offset;
diff --git a/epan/dissectors/packet-spnego.c b/epan/dissectors/packet-spnego.c
index 3033b17c41..37c7c90dce 100644
--- a/epan/dissectors/packet-spnego.c
+++ b/epan/dissectors/packet-spnego.c
@@ -1141,8 +1141,6 @@ rrc_rotate(void *data, int len, guint16 rrc, int unrotate)
tmp = buf;
} else {
tmp = g_malloc(rrc);
- if (tmp == NULL)
- return -1;
}
if (unrotate) {
diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c
index 9bca0c3ed2..794e3b710f 100644
--- a/epan/dissectors/packet-ssl-utils.c
+++ b/epan/dissectors/packet-ssl-utils.c
@@ -1764,10 +1764,6 @@ ssl_generate_keyring_material(SslDecryptSession*ssl_session)
key_block.data_len = needed;
key_block.data = g_malloc(needed);
- if (!key_block.data) {
- ssl_debug_printf("ssl_generate_keyring_material can't allocate key_block (len %d)\n", needed);
- return -1;
- }
ssl_debug_printf("ssl_generate_keyring_material sess key generation\n");
if (PRF(ssl_session,&ssl_session->master_secret,"key expansion",
&ssl_session->server_random,&ssl_session->client_random,
diff --git a/tap-iostat.c b/tap-iostat.c
index e5b354d5b1..b718cace1b 100644
--- a/tap-iostat.c
+++ b/tap-iostat.c
@@ -559,10 +559,6 @@ register_io_tap(io_stat_t *io, int i, const char *filter)
exit(10);
}
field=g_malloc(parenp-p+1);
- if(!field){
- fprintf(stderr, "tshark: Out of memory.\n");
- exit(10);
- }
memcpy(field, p, parenp-p);
field[parenp-p] = '\0';
flt=parenp + 1;