summaryrefslogtreecommitdiffstats
path: root/src/sessionp.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-05-16 17:37:46 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2013-05-16 17:37:46 +0200
commit8080e785554fadc859c0d275c703b12e22d86d52 (patch)
tree672d794519be43a08dbe6107e9fa0d66ee5c7c1c /src/sessionp.c
parentf543c741785ea26d840ad570d107453af33c5eaf (diff)
Fix potential null pointer dereference introduced in commit 38084f56e0fea23249b010f0fc37c20c33871840
Diffstat (limited to 'src/sessionp.c')
-rw-r--r--src/sessionp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sessionp.c b/src/sessionp.c
index a5b2b18..e325d06 100644
--- a/src/sessionp.c
+++ b/src/sessionp.c
@@ -162,7 +162,7 @@ int session_load(char **cmd_device, char **current_cmd, alloc_data_t *list_free_
int session_save(alloc_data_t *list_free_space, struct ph_param *params, const struct ph_options *options)
{
FILE *f_session;
- if(params->status==STATUS_QUIT)
+ if(params!=NULL && params->status==STATUS_QUIT)
return 0;
f_session=fopen(SESSION_FILENAME,"wb");
if(!f_session)