aboutsummaryrefslogtreecommitdiffstats
path: root/src/androidselect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/androidselect.c')
-rw-r--r--src/androidselect.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/androidselect.c b/src/androidselect.c
index 8d3cfac1df9..337747cbcb4 100644
--- a/src/androidselect.c
+++ b/src/androidselect.c
@@ -418,7 +418,10 @@ close_asset_fd (void *afd)
418} 418}
419 419
420/* Return the offset, file descriptor and length of the data contained 420/* Return the offset, file descriptor and length of the data contained
421 in the asset file descriptor AFD, in *FD, *OFFSET, and *LENGTH. 421 in the asset file descriptor AFD, in *FD, *OFFSET, and *LENGTH. AFD
422 will not be released if an exception is detected; it is the
423 responsibility of the caller to arrange that it be.
424
422 Value is 0 upon success, 1 otherwise. */ 425 Value is 0 upon success, 1 otherwise. */
423 426
424static int 427static int
@@ -487,6 +490,9 @@ extract_fd_offsets (jobject afd, int *fd, jlong *offset, jlong *length)
487 *fd = (*android_java_env)->CallIntMethod (android_java_env, 490 *fd = (*android_java_env)->CallIntMethod (android_java_env,
488 java_fd, 491 java_fd,
489 fd_class.get_fd); 492 fd_class.get_fd);
493 android_exception_check_1 (java_fd);
494 ANDROID_DELETE_LOCAL_REF (java_fd);
495
490 if (*fd >= 0) 496 if (*fd >= 0)
491 return 0; 497 return 0;
492 } 498 }