Re: [PATCH BlueZ v2] mesh: Use node uuids as storage directory names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Brian,

On 05/07/2019 03:41 PM, Gix, Brian wrote:

<snip>

+		if (asprintf(&cfg, "%s/%s/node.json", dir_name,
+						entry->d_name) < 0)
+			continue;

With ELL, we do not use asprintf.  Every dynamic allocation must map back to l_malloc, which performs an
abort() if a memory allocation fails.  So this should be re-coded as a malloc of the desired size, and then use
snprintf, using the malloc'd length as N.


...or use l_strdup_printf.  Which is actually asprintf underneath... ;)

Regards,
-Denis



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux