Upstream version 10.38.208.0
[platform/framework/web/crosswalk.git] / src / base / android / java / src / org / chromium / base / library_loader / Linker.java
index 49a76b6..7771cbf 100644 (file)
@@ -1013,7 +1013,8 @@ public class Linker {
             mRelroStart = in.readLong();
             mRelroSize = in.readLong();
             ParcelFileDescriptor fd = in.readFileDescriptor();
-            mRelroFd = fd.detachFd();
+            // If CreateSharedRelro fails, the OS file descriptor will be -1 and |fd| will be null.
+            mRelroFd = (fd == null) ? -1 : fd.detachFd();
         }
 
         // from Parcelable