eventscript: fix cleanup path when setting up script list
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 18 Dec 2009 01:24:24 +0000 (11:54 +1030)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Fri, 18 Dec 2009 01:31:34 +0000 (12:31 +1100)
commit843a2ed5ef85f628788b0caf7417c6b61b5c6d3f
treede8bcb874733029f70b17fef87560bf705429dbe
parent7101ae80bf4e530f48e31e4c58707aa45a9fd3d5
eventscript: fix cleanup path when setting up script list

We shouldn't set ctdb->current_monitor until we set destructor: that's
what cleans it up.

Also, free state->scripts on no-scripts exit path: it's not a child of
state because we need it in the destructor.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
server/eventscript.c