Add error checking in frame_identify()
authorSvyatoslav Ilinskiy <ilinskiy.sv@gmail.com>
Mon, 3 Apr 2017 20:56:16 +0000 (15:56 -0500)
committerSvyatoslav Ilinskiy <ilinskiy.sv@gmail.com>
Mon, 3 Apr 2017 20:59:29 +0000 (15:59 -0500)
Signed-off-by: Svyatoslav Ilinskiy <ilinskiy.sv@gmail.com>

include/barrelfish/capabilities.h

index 2915856..30b49e5 100644 (file)
@@ -179,6 +179,9 @@ static inline errval_t frame_identify(struct capref frame, struct frame_identity
             return err_push(err, LIB_ERR_SLOT_ALLOC);
         }
         err = cap_copy(invokable, frame);
+        if (err_is_fail(err)) {
+            return err_push(err, LIB_ERR_CAP_COPY);
+        }
     }
 
     err = invoke_frame_identify(invokable, ret);