}
c = g_try_new0(struct at_command, 1);
-
if (!c)
return 0;
len = strlen(cmd);
c->cmd = g_try_new(char, len + 2);
-
if (!c->cmd) {
g_free(c);
return 0;
}
line = g_try_new(char, line_length + 1);
-
if (!line) {
ring_buffer_drain(p->buf, p->read_so_far);
return NULL;
return NULL;
chat = g_try_new0(GAtChat, 1);
-
if (!chat)
return chat;
return 0;
notify = g_try_new0(struct at_notify, 1);
-
if (!notify) {
g_free(key);
return 0;
return 0;
node = g_try_new0(struct at_notify_node, 1);
-
if (!node)
return 0;
if (!channel)
return NULL;
- mux = g_new0(GAtMux, 1);
+ mux = g_try_new0(GAtMux, 1);
if (!mux)
return NULL;
line_length -= 3;
line = g_try_new(char, line_length + 1);
-
if (!line) {
ring_buffer_drain(p->read_buf, p->read_so_far);
return NULL;
if (real_size > MAX_SIZE)
return NULL;
- buffer = g_new(struct ring_buffer, 1);
-
+ buffer = g_try_new(struct ring_buffer, 1);
if (!buffer)
return NULL;
- buffer->buffer = g_new(unsigned char, real_size);
-
+ buffer->buffer = g_try_new(unsigned char, real_size);
if (!buffer->buffer) {
g_free(buffer);
return NULL;