Revision 0d550e4f

View differences:

src/CloudSupport/cloud_helper.c
19 19

  
20 20
#define CLOUD_HELPER_INITAIL_INSTANCES 2
21 21

  
22
#ifdef DELEGATE
22 23
extern struct cloud_helper_iface delegate;
24
#endif
23 25

  
24 26
struct cloud_helper_context {
25 27
  struct cloud_helper_iface *ch;
......
86 88

  
87 89
  ctx = malloc(sizeof(struct cloud_helper_context));
88 90
  if (!ctx) return NULL;
91
  memset(ctx, 0, sizeof(struct cloud_helper_context));
92
#ifdef DELEGATE
89 93
  if (strcmp(provider, "delegate") == 0){
90 94
    ctx->ch = &delegate;
91 95
  }
96
#endif
97
  if (!ctx->ch) {
98
    free(ctx);
99

  
100
    return NULL;
101
  }
92 102

  
93 103
 ctx->ch_context = ctx->ch->cloud_helper_init(local, config);
94 104
 if(!ctx->ch_context){

Also available in: Unified diff