You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1002 B

  1. From 59a34946f1b0076c1f72c8d024b991c7aca41589 Mon Sep 17 00:00:00 2001
  2. From: Thierry FOURNIER <thierry.fournier@ozon.io>
  3. Date: Sat, 17 Dec 2016 12:05:56 +0100
  4. Subject: [PATCH 11/19] BUG/MINOR: lua: bad return code
  5. If the lua/cli fails during initialization, it returns an ok
  6. status, an the execution continue. This will probably occur a
  7. segfault.
  8. Thiw patch should be backported in 1.7
  9. (cherry picked from commit 33558c4a3f2521bb33fa71ebb312babbf1361c13)
  10. ---
  11. src/hlua.c | 2 +-
  12. 1 file changed, 1 insertion(+), 1 deletion(-)
  13. diff --git a/src/hlua.c b/src/hlua.c
  14. index cdef8ed..45e3164 100644
  15. --- a/src/hlua.c
  16. +++ b/src/hlua.c
  17. @@ -6453,7 +6453,7 @@ static int hlua_cli_parse_fct(char **args, struct appctx *appctx, void *private)
  18. appctx->ctx.hlua_cli.task = task_new();
  19. if (!appctx->ctx.hlua_cli.task) {
  20. SEND_ERR(NULL, "Lua cli '%s': out of memory.\n", fcn->name);
  21. - return 0;
  22. + return 1;
  23. }
  24. appctx->ctx.hlua_cli.task->nice = 0;
  25. appctx->ctx.hlua_cli.task->context = appctx;
  26. --
  27. 2.10.2