Avert a crash and file descriptor leak in yank-media
* java/org/gnu/emacs/EmacsNative.java (close): New declaration. * java/org/gnu/emacs/EmacsSdk11Clipboard.java (getClipboardData): Catch SecurityException and guarantee file descriptors are closed even if exceptions arise. * src/android.c (dup): Export another function.
This commit is contained in:
@@ -39,6 +39,9 @@ public final class EmacsNative
|
||||
/* Like `dup' in C. */
|
||||
public static native int dup (int fd);
|
||||
|
||||
/* Like `close' in C. */
|
||||
public static native int close (int fd);
|
||||
|
||||
/* Obtain the fingerprint of this build of Emacs. The fingerprint
|
||||
can be used to determine the dump file name. */
|
||||
public static native String getFingerprint ();
|
||||
|
||||
Reference in New Issue
Block a user