Commit 0a0de9d0 authored by Mike Hibler's avatar Mike Hibler

Beware of running out of memory when allocating callback elements.

parent e9530003
......@@ -98,11 +98,13 @@ struct timeval {
callback_data_t new_data;
new_data = allocate_callback_data();
new_data->callback_notification =
event_notification_clone(handle,notification);
new_data->next = NULL;
if (new_data) {
new_data->callback_notification =
event_notification_clone(handle,notification);
new_data->next = NULL;
enqueue_callback_data(new_data);
enqueue_callback_data(new_data);
}
}
/*
......
......@@ -1867,11 +1867,13 @@ SWIG_AsVal_unsigned_SS_int SWIG_PERL_DECL_ARGS_2(SV * obj, unsigned int *val)
callback_data_t new_data;
new_data = allocate_callback_data();
new_data->callback_notification =
event_notification_clone(handle,notification);
new_data->next = NULL;
if (new_data) {
new_data->callback_notification =
event_notification_clone(handle,notification);
new_data->next = NULL;
enqueue_callback_data(new_data);
enqueue_callback_data(new_data);
}
}
/*
......
......@@ -3109,11 +3109,13 @@ SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
callback_data_t new_data;
new_data = allocate_callback_data();
new_data->callback_notification =
event_notification_clone(handle,notification);
new_data->next = NULL;
if (new_data) {
new_data->callback_notification =
event_notification_clone(handle,notification);
new_data->next = NULL;
enqueue_callback_data(new_data);
enqueue_callback_data(new_data);
}
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment