search for: _vector_iter

Displaying 3 results from an estimated 3 matches for "_vector_iter".

2023 Jan 31
1
[PATCH libnbd] generator: Pass LISTEN_FDNAMES=nbd with systemd socket activation
...fix length Sure, go for it please. > (2) Pre-patch, at commit 5a02c7d2cc6a, the error handling tail of > prepare_socket_activation_environment() is less than ideal, IMO. Namely, > we have (excerpt) > > > err: > > set_error (errno, "malloc"); > > string_vector_iter (env, (void *) free); > > free (env->ptr); > > return -1; > > (2a) we free the vector's pointer field, but don't NULL it, nor do we > zero the len or cap fields. > > We should call string_vector_reset() instead. Yup. > (2b) Casting the address of the...
2023 Jan 31
1
[PATCH libnbd] generator: Pass LISTEN_FDNAMES=nbd with systemd socket activation
...the array -- use "sizeof" for grabbing the prefix length (2) Pre-patch, at commit 5a02c7d2cc6a, the error handling tail of prepare_socket_activation_environment() is less than ideal, IMO. Namely, we have (excerpt) > err: > set_error (errno, "malloc"); > string_vector_iter (env, (void *) free); > free (env->ptr); > return -1; (2a) we free the vector's pointer field, but don't NULL it, nor do we zero the len or cap fields. We should call string_vector_reset() instead. (2b) Casting the address of the free() function to (void*) makes me uncomfort...
2023 Jan 28
1
[PATCH libnbd] generator: Pass LISTEN_FDNAMES=nbd with systemd socket activation
systemd allows sockets passed through socket activation to be named with the protocol they require. We only ever pass one socket, name it. This environment variable is currently ignored by qemu-nbd and nbdkit, but might be used by qemu-storage-daemon: https://lists.nongnu.org/archive/html/qemu-devel/2023-01/msg06114.html --- generator/states-connect-socket-activation.c | 41