Displaying 1 result from an estimated 1 matches for "9142a0843e".
2023 Mar 08
2
[PATCH libnbd] lib/errors.c: Fix assert fail in exit path in multi-threaded code
...The caller should have used set_error() before reaching here */
-  assert (nbd_get_error ());
   abort_option (h);
   nbd_internal_abort_commands (h, &h->cmds_to_issue);
   nbd_internal_abort_commands (h, &h->cmds_in_flight);
diff --git a/lib/errors.c b/lib/errors.c
index 8b77650ef3..9142a0843e 100644
--- a/lib/errors.c
+++ b/lib/errors.c
@@ -93,7 +93,10 @@ allocate_last_error_on_demand (void)
     last_error = calloc (1, sizeof *last_error);
     if (last_error) {
       int err = pthread_setspecific (errors_key, last_error);
-      if (err != 0) {
+      /* Ignore EINVAL because that ca...