Committed by
Gerrit Code Review
Null pointer Deferenced on Exception Flow
Change-Id: Ibd58f19c2091249448a4ba826134f0089a88ac01
Showing
1 changed file
with
2 additions
and
0 deletions
... | @@ -72,9 +72,11 @@ public class NetconfOperation { | ... | @@ -72,9 +72,11 @@ public class NetconfOperation { |
72 | log.error("Unable to send Hello Message to the device: ", e); | 72 | log.error("Unable to send Hello Message to the device: ", e); |
73 | } finally { | 73 | } finally { |
74 | log.debug("Closing the session after successful execution"); | 74 | log.debug("Closing the session after successful execution"); |
75 | + if (ssh != null) { | ||
75 | ssh.close(); | 76 | ssh.close(); |
76 | } | 77 | } |
77 | } | 78 | } |
79 | + } | ||
78 | 80 | ||
79 | private void executeMessage(SSHSession ssh, String xmlMsg) | 81 | private void executeMessage(SSHSession ssh, String xmlMsg) |
80 | throws IOException, JNCException { | 82 | throws IOException, JNCException { | ... | ... |
-
Please register or login to post a comment