From ebfa3ab1fad3aec5cc1ce0a8496b85da6bcaf064 Mon Sep 17 00:00:00 2001 From: Eli Collins Date: Fri, 11 Jan 2013 18:47:52 +0000 Subject: [PATCH] HDFS-4384. test_libhdfs_threaded gets SEGV if JNIEnv cannot be initialized. Contributed by Colin Patrick McCabe git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1432221 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++ .../hadoop-hdfs/src/main/native/libhdfs/native_mini_dfs.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 1f191d20fc3..d978137e988 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -698,6 +698,8 @@ Release 2.0.3-alpha - Unreleased HDFS-4306. PBHelper.convertLocatedBlock miss convert BlockToken. (Binglin Chang via atm) + HDFS-4387. test_libhdfs_threaded SEGV on OpenJDK 7. (Colin McCabe via eli) + BREAKDOWN OF HDFS-3077 SUBTASKS HDFS-3077. Quorum-based protocol for reading and writing edit logs. diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/native_mini_dfs.c b/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/native_mini_dfs.c index a1e786450f0..a1476ca18f0 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/native_mini_dfs.c +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/native_mini_dfs.c @@ -52,7 +52,7 @@ struct NativeMiniDfsCluster* nmdCreate(struct NativeMiniDfsConf *conf) if (!env) { fprintf(stderr, "nmdCreate: unable to construct JNIEnv.\n"); - goto error; + return NULL; } cl = calloc(1, sizeof(struct NativeMiniDfsCluster)); if (!cl) {