Avoiding a potential memory leak in xorriso main()
This commit is contained in:
@ -36,10 +36,14 @@ char *Xorriso__get_version_text(int flag);
|
||||
@param progname typically argv[0] of main(). Some leafnames of the progname
|
||||
path have special meaning and trigger special behavior:
|
||||
"osirrox" allows image-to-disk copying: -osirrox "on"
|
||||
"xorrisofs" activates permanent mkisofs emulation
|
||||
"xorrisofs" activates -as "mkisofs" emulation from start
|
||||
"genisofs" alias of "xorrisofs"
|
||||
"mkisofs" alias of "xorrisofs"
|
||||
"genisoimage" alias of "xorrisofs"
|
||||
"xorrecord" activates -as "cdrecord" emulation from start
|
||||
"cdrecord" alias of "xorrecord"
|
||||
"wodim" alias of "xorrecord"
|
||||
"cdrskin" alias of "xorrecord"
|
||||
@param flag unused yet, submit 0
|
||||
@return >0 success , <=0 failure, no object created
|
||||
*/
|
||||
@ -102,6 +106,12 @@ int Xorriso_read_rc(struct XorrisO *xorriso, int flag);
|
||||
@param argc Number of arguments.
|
||||
@param argv The arguments. (*argv)[0] contains the program name.
|
||||
(*argv)[1] to (*argv)[argc-1] contain commands and parameters
|
||||
If argv after the call differs from argv before the call,
|
||||
then one should dispose it later by:
|
||||
for(i= 0; i < argc; i++)
|
||||
if(argv[i] != NULL)
|
||||
free(argv[i]);
|
||||
free(argv);
|
||||
@param flag unused yet, submit 0
|
||||
@return <= 0 error , > 0 success
|
||||
*/
|
||||
@ -258,8 +268,7 @@ int Xorriso_set_problem_status(struct XorrisO *xorriso, char *severity,
|
||||
|
||||
|
||||
/* The next two functions are part of Xorriso_eval_problem_status().
|
||||
You may use them to build an own advisor function or to drain the
|
||||
library message queues more frequently.
|
||||
You may use them to build an own advisor function.
|
||||
*/
|
||||
|
||||
/** Obtain the current problem status of the xorriso handle.
|
||||
@ -277,7 +286,10 @@ int Xorriso_get_problem_status(struct XorrisO *xorriso, char severity[80],
|
||||
the severity of the library events like the severity of a message submitted
|
||||
via Xorriso_msgs_submit().
|
||||
xorriso sets the message queues of the libraries to queuing "ALL".
|
||||
So it is essential that they get drained regularly.
|
||||
Many inner functions of xorriso call Xorriso_process_msg_queues() on their
|
||||
own because they expect library output pending. Nevertheless, a loop of
|
||||
xorriso option calls should either call Xorriso_eval_problem_status() or
|
||||
Xorriso_process_msg_queues() with each cycle.
|
||||
@param xorriso The environment handle
|
||||
@param flag Unused yet. Submit 0.
|
||||
@return 1 on success, <=0 if failure
|
||||
|
Reference in New Issue
Block a user