This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.

View the commit online.

commit 608e2fcebfe8df0085d77a483d8b3402ef64ccb1
Author: rafspiny <rafsp...@gmail.com>
AuthorDate: Wed Aug 2 21:53:59 2023 +0200

    Address calloc failure
---
 src/modules/convertible/dbus_acceleration.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index d7041951e..9d98ff1ce 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -20,6 +20,7 @@ sensor_proxy_init()
       return accelerometer_dbus;
    }
    accelerometer_dbus  = calloc(1, sizeof(DbusAccelerometer));
+   EINA_SAFETY_ON_NULL_RETURN_VAL(accelerometer_dbus, NULL);
 
    // The next line is probably redundant
    accelerometer_dbus->orientation = undefined;
@@ -147,6 +148,7 @@ access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant,
       *result = EINA_FALSE;
    }
    const char **string_property_value = calloc(PATH_MAX, sizeof(char));
+   EINA_SAFETY_ON_NULL_RETURN_VAL(string_property_value, EINA_FALSE);
    if (!eldbus_message_iter_arguments_get((*variant), "s", string_property_value))
    {
       WARN("error in eldbus_message_iter_arguments_get()");
@@ -241,6 +243,7 @@ on_accelerometer_orientation(void *data, const Eldbus_Message *msg, Eldbus_Pendi
    enum screen_rotation orientation;
    Eldbus_Message_Iter *variant = NULL;
    Eina_Bool* result = calloc(1, sizeof(Eina_Bool));
+   EINA_SAFETY_ON_NULL_RETURN_VAL(result, NULL);
 
    if (eldbus_message_error_get(msg, &errname, &errmsg))
    {
@@ -401,6 +404,7 @@ _fetch_and_rotate_screen(const char* randr_id, enum screen_rotation orientation)
       Ecore_X_Atom format_ret;
       char *result = NULL;
       TransformationMatrix *matrix = calloc(1, sizeof(TransformationMatrix));
+      EINA_SAFETY_ON_NULL_RETURN_VAL(matrix, NULL);
       result = ecore_x_input_device_property_get(x_dev_num, CTM_name, &num_ret, &format_ret, &unit_size_ret);
       if (result != NULL)
       {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to