Fix more asprintf warnings and some error path errors.
[jra/samba/.git] / source3 / rpc_server / srv_lsa_hnd.c
index 377ed505b4e2448380c6027cdffb5ffc12342b40..839833ce542fd839c4ffb8d7180b8c30cc8f845c 100644 (file)
@@ -54,10 +54,13 @@ bool init_pipe_handle_list(pipes_struct *p, const char *pipe_name)
                                (is_samr_lsa_pipe(plist->name) && is_samr_lsa_pipe(pipe_name))) {
                        if (!plist->pipe_handles) {
                                char *msg;
-                               asprintf(&msg, "init_pipe_handles: NULL "
-                                        "pipe_handle pointer in pipe %s",
-                                        pipe_name);
-                               smb_panic(msg);
+                               if (asprintf(&msg, "init_pipe_handles: NULL "
+                                                "pipe_handle pointer in pipe %s",
+                                                pipe_name) != -1) {
+                                       smb_panic(msg);
+                               } else {
+                                       smb_panic("init_pipe_handle_list");
+                               }
                        }
                        hl = plist->pipe_handles;
                        break;